Click here to Skip to main content
15,893,381 members
Home / Discussions / C#
   

C#

 
AnswerRe: RichTextBox - LinkHover Event? Pin
Ed.Poore17-Apr-06 12:18
Ed.Poore17-Apr-06 12:18 
QuestionHow to minimize a form Pin
mrkeivan17-Apr-06 7:56
mrkeivan17-Apr-06 7:56 
AnswerRe: How to minimize a form Pin
Eric Dahlvang17-Apr-06 10:42
Eric Dahlvang17-Apr-06 10:42 
AnswerRe: How to minimize a form Pin
3Dizard17-Apr-06 10:48
3Dizard17-Apr-06 10:48 
AnswerRe: How to minimize a form Pin
MSNFans17-Apr-06 18:02
MSNFans17-Apr-06 18:02 
QuestionDataTable and Update Pin
zaboboa17-Apr-06 7:15
zaboboa17-Apr-06 7:15 
Questionupdating sql server using dataGrid Pin
jbu2017-Apr-06 6:25
jbu2017-Apr-06 6:25 
AnswerRe: updating sql server using dataGrid Pin
jbu2017-Apr-06 23:50
jbu2017-Apr-06 23:50 
Questionproblem in treeview folders contents display on right side Pin
chaitanyapissay17-Apr-06 6:17
chaitanyapissay17-Apr-06 6:17 
AnswerRe: problem in treeview folders contents display on right side Pin
Ravi Bhavnani17-Apr-06 6:24
professionalRavi Bhavnani17-Apr-06 6:24 
GeneralRe: problem in treeview folders contents display on right side Pin
chaitanyapissay17-Apr-06 7:11
chaitanyapissay17-Apr-06 7:11 
AnswerRe: problem in treeview folders contents display on right side Pin
Ravi Bhavnani17-Apr-06 7:15
professionalRavi Bhavnani17-Apr-06 7:15 
QuestionHow to save exported data into any location with desire file name Pin
Aayush Singh17-Apr-06 5:51
Aayush Singh17-Apr-06 5:51 
AnswerRe: How to save exported data into any location with desire file name Pin
Ravi Bhavnani17-Apr-06 6:22
professionalRavi Bhavnani17-Apr-06 6:22 
QuestionFilter DataSet in Windows Form Pin
jrprogrmr17-Apr-06 4:02
jrprogrmr17-Apr-06 4:02 
AnswerRe: Filter DataSet in Windows Form Pin
Braulio Dez17-Apr-06 7:20
Braulio Dez17-Apr-06 7:20 
Questionpassing an array of floats from C++ dll to C# Pin
Denis Shamanin17-Apr-06 3:59
Denis Shamanin17-Apr-06 3:59 
AnswerRe: passing an array of floats from C++ dll to C# Pin
Andy Moore17-Apr-06 4:06
Andy Moore17-Apr-06 4:06 
GeneralRe: passing an array of floats from C++ dll to C# Pin
Denis Shamanin17-Apr-06 4:15
Denis Shamanin17-Apr-06 4:15 
QuestionProblem with enum created from xsd Pin
Dan Neely17-Apr-06 3:45
Dan Neely17-Apr-06 3:45 
I've got a numerical value that can have only a small number of legal, non contigious values that's stored in an XML file.

The value's defined in the XSD like this:
<code><xs:element name="Number">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:enumeration value="100"/>
<xs:enumeration value="179"/>
<xs:enumeration value="654"/>
</xs:restriction>
</xs:simpleType>
</xs:element></code>

and an entry in the XML looks like:
<code><Number>179</Number></code>

The class created by the XSD tool is:
<code>public enum Number
{
[System.Xml.Serialization.XmlEnumAttribute("100")]
Item100,
[System.Xml.Serialization.XmlEnumAttribute("179")]
Item179,
[System.Xml.Serialization.XmlEnumAttribute("654")]
Item654,
}</code>

When I use the debugger to view the value of a Number that was loaded from an XML file it looks like "Item100". The problem is that if I want to assign it a new value stored in an integer by doing:
<code>numberValue = (Number)100;</code>

numberValue is assigned "100", this will be correctly written if the XML is serialized, but having two different representations for the same value is causing problems elsewhere in my backend. I can't cast the string "Item100" a Number object, and would like to avoid a two dozen item if/else statement of this form:
<code>if (s == "Item100")
num = Number.Item100;</code>
AnswerRe: Problem with enum created from xsd Pin
Guffa17-Apr-06 4:46
Guffa17-Apr-06 4:46 
GeneralRe: Problem with enum created from xsd Pin
Dan Neely17-Apr-06 5:36
Dan Neely17-Apr-06 5:36 
QuestionExample On InternetGetConnectedStateEx Pin
visalak17-Apr-06 2:29
visalak17-Apr-06 2:29 
QuestionHow to carry out MoneyCell with the VS2005 and GDI+? Pin
Chinese_ynzy17-Apr-06 0:22
Chinese_ynzy17-Apr-06 0:22 
QuestionHow to add set Index for Label in C#? Pin
tosen_z16-Apr-06 23:53
tosen_z16-Apr-06 23:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.