null是无法识别的文字 [英] null is unrecognized literal

查看:101
本文介绍了null是无法识别的文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行一些我从Pro .Net 2.0 Windows Forms

和C#中的自定义控件输入的代码,我得到两个看似错误的错误

他们不应该发生。


一个例子是:


if(mc == null )[其中mc是对Quartz.dll的引用,我通过让VS 2008进行互操作来获取
]


它给了我类似的东西; null是一个无法识别的文字。

下一个是:


if(mc.ShowDialog()== DialogResult.OK)
<它返回并说确定无法识别Enum


我需要提供一些名称空间才能使这些工作吗?

I''m trying to run some code I typed in from "Pro .Net 2.0 Windows Forms
and Custom Controls in C#", and I''m getting two errors that seem like
they shouldn''t be happening.

One example is:

if (mc == null) [where mc is a reference to Quartz.dll, which I
pulled in by letting VS 2008 do an interop]

It gives me something like "null is an unrecognized literal".
Next one is:

if (mc.ShowDialog() == DialogResult.OK)

it comes back and says "OK is unrecognized Enum"

Is there some namespace I need to pull in to make these work?

推荐答案




不,你确定要创建一个C#项目吗?


-

Ignacio Machin
http ://www.laceupsolu tions.com

手机&仓库解决方案。

" doofy" < no ** @ notme.comwrote in message

news:47 *********************** @ news.sonic。 net ...
Hi,

No, ar eyou sure u r creating a C# project?

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...

我正在尝试运行一些我从Pro .Net 2.0 Windows Forms

输入的代码C#中的自定义控件,我得到两个看起来像他们不会发生的错误

不应该发生。


一个例子是:


if(mc == null)[其中mc是对Quartz.dll的引用,我通过让VS 2008做一个互操作来拉取

in]


它给了我类似null是一个无法识别的文字的东西。


下一个是:


如果(mc.ShowDialog()== DialogResult.OK)


它会回来并说确定无法识别Enum


我需要提供一些名称空间来使这些工作吗?
I''m trying to run some code I typed in from "Pro .Net 2.0 Windows Forms
and Custom Controls in C#", and I''m getting two errors that seem like they
shouldn''t be happening.

One example is:

if (mc == null) [where mc is a reference to Quartz.dll, which I pulled
in by letting VS 2008 do an interop]

It gives me something like "null is an unrecognized literal".
Next one is:

if (mc.ShowDialog() == DialogResult.OK)

it comes back and says "OK is unrecognized Enum"

Is there some namespace I need to pull in to make these work?



Ignacio Machin(.NET / C#MVP)写道:
Ignacio Machin ( .NET/ C# MVP ) wrote:




不,你确定要创建一个C#项目吗?
Hi,

No, ar eyou sure u r creating a C# project?



我对此感到疑惑。我是C#和VS 2008的新手。我为C#设置了

设置。它接受代码中的花括号,其中C ++

将使用括号。

I wondered about that. I''m new to both C# and VS 2008. I set the
settings for C#. It''s accepting curly braces in the code where C++
would use a parenthesis.


Ignacio Machin(.NET / C#MVP)写道:
Ignacio Machin ( .NET/ C# MVP ) wrote:




不,你确定要创建一个C#项目吗?
Hi,

No, ar eyou sure u r creating a C# project?



所以,我已经专门将环境设置为C#,并且我正在获取使用.cpp文件类型生成的文件

。这是否也发生在C#中?

So, I''ve specifically set the environment to C#, and I''m getting files
that are generated with the .cpp file type. Does this happen in C# also?


这篇关于null是无法识别的文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆