2009年5月18日星期一

Greetings.

Greetings.

As you read this, don't feel sorry for me, because it is the destiny of everyman to die someday. I am Anthony E Francisco Khalid, a naturalised Briton by birth and a business merchant based in the
United Kingdom. I have been diagnosed with Oesophageal cancer.

It has defiled all forms of medical treatment, and right now I have only about a few months to live, according to medical experts. Hence I have decided to support charity work; this is what i want to be remembered for. So far, I have been able to reach out to a few charity organizations now that my health has deteriorated so badly, I cannot do this myself anymore.

The last of my belonging which no one knows of, is the deposit of Eight Million US dollars ($8,000,000.00) that I have in a safe keeping company abroad, which I will want you to secure and bestow to charity organizations.

Please reply me via: anthonyfranciscokhalid@gmail.com

For your time and devotion, I have set aside a 20% of this for you.
May the good lord be with you?

Mr: Anthony E Francisco Khalid.

2009年5月5日星期二

Re: Recall: enum 中如何处理 ToString()

Yes,
 这个是微软.NET组的顾问写的文章摘录出来的

 
2009/5/5 michael zhang <mcwind@gmail.com>

成员也是Color类型的??对吗?
2009/5/5 shenghe cao <caoshenghe@gmail.com>

enum Color {

   Red,       // Assigned a value of 0

   Green,     // Assigned a value of 1

   Blue,      // Assigned a value of 2

   Orange     // Assigned a value of 3

}

     

When an enumerated type is compiled, the compiler automatically turns each symbol into a constant field of the type. For example, the compiler treats the Color enumeration shown previously as if you had written code similar to this:

struct Color : System.Enum {

   public const Color Red    = (Color) 0;

   public const Color Green  = (Color) 1;

   public const Color Blue   = (Color) 2;

   public const Color Orange = (Color) 3;

}

 看了这个我想我们该明白为啥不能在enum重载ToString了吧




2008/11/25 <ya-ping_zhang@agilent.com>

是的,通常情况下默认实现是够用了,但是我希望重载 ToString,或许重载不是个好主意

 

Best Regards,

Yaping

 

From: shenghe cao [mailto:caoshenghe@gmail.com]
Sent: 2008
1125 16:53
To: ZHANG,YA-PING (A-China,ex1)
Cc: objectsolution@googlegroups.com; zyap.cn.dongning@blogger.com
Subject: Re: Recall: enum
中如何处理 ToString()

 

我今天刚好试验了一下enum
如果将一个enumcollection加到combobox
显示的就是enum得显示值啊

难道你的需求是需要对ToString做什么处理?我觉得他的默认实现很多时候就够用阿

2008/10/24 <ya-ping_zhang@agilent.com>


ZHANG,YA-PING (A-China,ex1) would like to recall the message, "enum
中如何处理 ToString()".


 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ObjectSolution" group.
To post to this group, send email to objectsolution@googlegroups.com
To unsubscribe from this group, send email to objectsolution+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/objectsolution?hl=en
-~----------~----~----~----~------~----~------~--~---



Re: Recall: enum 中如何处理 ToString()


成员也是Color类型的??对吗?
2009/5/5 shenghe cao <caoshenghe@gmail.com>

enum Color {

   Red,       // Assigned a value of 0

   Green,     // Assigned a value of 1

   Blue,      // Assigned a value of 2

   Orange     // Assigned a value of 3

}

     

When an enumerated type is compiled, the compiler automatically turns each symbol into a constant field of the type. For example, the compiler treats the Color enumeration shown previously as if you had written code similar to this:

struct Color : System.Enum {

   public const Color Red    = (Color) 0;

   public const Color Green  = (Color) 1;

   public const Color Blue   = (Color) 2;

   public const Color Orange = (Color) 3;

}

 看了这个我想我们该明白为啥不能在enum重载ToString了吧




2008/11/25 <ya-ping_zhang@agilent.com>

是的,通常情况下默认实现是够用了,但是我希望重载 ToString,或许重载不是个好主意

 

Best Regards,

Yaping

 

From: shenghe cao [mailto:caoshenghe@gmail.com]
Sent: 2008
1125 16:53
To: ZHANG,YA-PING (A-China,ex1)
Cc: objectsolution@googlegroups.com; zyap.cn.dongning@blogger.com
Subject: Re: Recall: enum
中如何处理 ToString()

 

我今天刚好试验了一下enum
如果将一个enumcollection加到combobox
显示的就是enum得显示值啊

难道你的需求是需要对ToString做什么处理?我觉得他的默认实现很多时候就够用阿

2008/10/24 <ya-ping_zhang@agilent.com>


ZHANG,YA-PING (A-China,ex1) would like to recall the message, "enum
中如何处理 ToString()".


 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ObjectSolution" group.
To post to this group, send email to objectsolution@googlegroups.com
To unsubscribe from this group, send email to objectsolution+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/objectsolution?hl=en
-~----------~----~----~----~------~----~------~--~---


2009年5月4日星期一

Re: Recall: enum 中如何处理 ToString()

和C++一样。不过 C# 很 rich,如果编译器想做,还是可以做得到的。meta data目前包含了 class 的信息。包含一些 enum 的还是可行的。

2009/5/5 shenghe cao <caoshenghe@gmail.com>:
> enum Color {
>
>    Red,       // Assigned a value of 0
>
>    Green,     // Assigned a value of 1
>
>    Blue,      // Assigned a value of 2
>
>    Orange     // Assigned a value of 3
>
> }
>
>
>
> When an enumerated type is compiled, the compiler automatically turns each
> symbol into a constant field of the type. For example, the compiler treats
> the Color enumeration shown previously as if you had written code similar to
> this:
>
> struct Color : System.Enum {
>
>    public const Color Red    = (Color) 0;
>
>    public const Color Green  = (Color) 1;
>
>    public const Color Blue   = (Color) 2;
>
>    public const Color Orange = (Color) 3;
>
> }
>
>  看了这个我想我们该明白为啥不能在enum重载ToString了吧
>
>
> 2008/11/25 <ya-ping_zhang@agilent.com>
>>
>> 是的,通常情况下默认实现是够用了,但是我希望重载 ToString,或许重载不是个好主意
>>
>>
>>
>> Best Regards,
>>
>> Yaping
>>
>>
>>
>> From: shenghe cao [mailto:caoshenghe@gmail.com]
>> Sent: 2008年11月25日 16:53
>> To: ZHANG,YA-PING (A-China,ex1)
>> Cc: objectsolution@googlegroups.com; zyap.cn.dongning@blogger.com
>> Subject: Re: Recall: enum 中如何处理 ToString()
>>
>>
>>
>> 我今天刚好试验了一下enum
>> 如果将一个enum得collection加到combobox中
>> 显示的就是enum得显示值啊
>>
>> 难道你的需求是需要对ToString做什么处理?我觉得他的默认实现很多时候就够用阿
>>
>> 2008/10/24 <ya-ping_zhang@agilent.com>
>>
>> ZHANG,YA-PING (A-China,ex1) would like to recall the message, "enum 中如何处理
>> ToString()".
>>
>>
>>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "ObjectSolution" group.
> To post to this group, send email to objectsolution@googlegroups.com
> To unsubscribe from this group, send email to
> objectsolution+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/objectsolution?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

Re: Recall: enum 中如何处理 ToString()

enum Color {

   Red,       // Assigned a value of 0

   Green,     // Assigned a value of 1

   Blue,      // Assigned a value of 2

   Orange     // Assigned a value of 3

}

     

When an enumerated type is compiled, the compiler automatically turns each symbol into a constant field of the type. For example, the compiler treats the Color enumeration shown previously as if you had written code similar to this:

struct Color : System.Enum {

   public const Color Red    = (Color) 0;

   public const Color Green  = (Color) 1;

   public const Color Blue   = (Color) 2;

   public const Color Orange = (Color) 3;

}

 看了这个我想我们该明白为啥不能在enum重载ToString了吧




2008/11/25 <ya-ping_zhang@agilent.com>

是的,通常情况下默认实现是够用了,但是我希望重载 ToString,或许重载不是个好主意

 

Best Regards,

Yaping

 

From: shenghe cao [mailto:caoshenghe@gmail.com]
Sent: 2008
1125 16:53
To: ZHANG,YA-PING (A-China,ex1)
Cc: objectsolution@googlegroups.com; zyap.cn.dongning@blogger.com
Subject: Re: Recall: enum
中如何处理 ToString()

 

我今天刚好试验了一下enum
如果将一个enumcollection加到combobox
显示的就是enum得显示值啊

难道你的需求是需要对ToString做什么处理?我觉得他的默认实现很多时候就够用阿

2008/10/24 <ya-ping_zhang@agilent.com>


ZHANG,YA-PING (A-China,ex1) would like to recall the message, "enum
中如何处理 ToString()".


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ObjectSolution" group.
To post to this group, send email to objectsolution@googlegroups.com
To unsubscribe from this group, send email to objectsolution+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/objectsolution?hl=en
-~----------~----~----~----~------~----~------~--~---