English 中文(简体)
我怎么能够结束在C#中带有问题标记的财产?
原标题:How can I end a property with a question mark in C#?

我确信,这种信息可在C#光谱中查阅,但我认为,我 d给我一次直截了当的机会。 为什么要编纂这一法典?

namespace DataObjects
{
    class QuestionMark
    {
        public bool Possible? {get; set;}
    }
}

难道我能以什么方式使我的羊毛财产在问题标志中结束? 我认为,这将会增加可读性,并且是神圣的。

让我们听到!

最佳回答

我实际上并不认为它有许多工作要做,因为很容易确定哪类声明的依据。 可能有更多的工作要做。 如果你有变数? 归根结底,你无法确定正常提及变数和tern之间的差别。 例如:

int a;
bool b?;
a = b? ? 15 : 22; 
问题回答

Why don t you just name it IsPossible ? That is clear, consice and no subject for confusion.

问题标识是特殊性质,用于表明价值类型无效。

http://www.ecma-international.org/publications/standards/Ecma-334.htm 标准:

identifier-start-character::
    letter-character
    _ (the underscore character U+005F)

identifier-part-characters::
    identifier-part-character
    identifier-part-characters identifier-part-character

identifier-part-character::
    letter-character
    decimal-digit-character
    connecting-character
    combining-character
    formatting-character

letter-character::
    A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl
    A unicode-escape-sequence representing a character of classes Lu, Ll, Lt, Lm, Lo, or Nl

combining-character::
    A Unicode character of classes Mn or Mc
    A unicode-escape-sequence representing a character of classes Mn or Mc

decimal-digit-character::
    A Unicode character of the class Nd
    A unicode-escape-sequence representing a character of the class Nd

connecting-character::
    A Unicode character of the class Pc
    A unicode-escape-sequence representing a character of the class Pc

formatting-character::
    A Unicode character of the class Cf
    A unicode-escape-sequence representing a character of the class Cf

因此,识别资料仅限于只包含统法协会编码标准视为“字母”的特性。 “?” 是否是校正特征(P类)。

? C#具有特别性质。 如果采用某种类型,则是指

这样做无效。

这难道是一种鲁 Ruby吗?





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签