Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
QuestionHow would I make a button act like a ReadLine method Pin
Ioncycle4-Apr-03 10:05
Ioncycle4-Apr-03 10:05 
GeneralClass inheritance issue with XmlNodeList Pin
econner4-Apr-03 9:35
econner4-Apr-03 9:35 
GeneralRe: Class inheritance issue with XmlNodeList Pin
neroknights4-Apr-03 12:09
neroknights4-Apr-03 12:09 
GeneralGetting the FQDN of the host Pin
Arun Bhalla4-Apr-03 9:33
Arun Bhalla4-Apr-03 9:33 
GeneralClass Design Question Pin
Mark Sanders4-Apr-03 4:46
Mark Sanders4-Apr-03 4:46 
GeneralRe: Class Design Question Pin
Philip Fitzsimons4-Apr-03 4:53
Philip Fitzsimons4-Apr-03 4:53 
GeneralRe: Class Design Question Pin
Mark Sanders4-Apr-03 4:59
Mark Sanders4-Apr-03 4:59 
GeneralRe: Class Design Question Pin
Philip Fitzsimons4-Apr-03 5:09
Philip Fitzsimons4-Apr-03 5:09 
GeneralRe: Class Design Question Pin
Ranjan Banerji4-Apr-03 7:03
Ranjan Banerji4-Apr-03 7:03 
GeneralRe: Class Design Question Pin
Mark Sanders4-Apr-03 7:51
Mark Sanders4-Apr-03 7:51 
GeneralRe: Class Design Question Pin
Nnamdi Onyeyiri4-Apr-03 8:01
Nnamdi Onyeyiri4-Apr-03 8:01 
GeneralRespond to UI Messages Pin
Roger CS4-Apr-03 3:41
Roger CS4-Apr-03 3:41 
GeneralRe: Respond to UI Messages Pin
neroknights4-Apr-03 4:06
neroknights4-Apr-03 4:06 
GeneralRe: Respond to UI Messages Pin
Nick Seng6-Apr-03 16:45
Nick Seng6-Apr-03 16:45 
GeneralRe: Respond to UI Messages Pin
neroknights7-Apr-03 5:12
neroknights7-Apr-03 5:12 
GeneralRe: Respond to UI Messages Pin
Nick Seng7-Apr-03 16:12
Nick Seng7-Apr-03 16:12 
GeneralRe: Respond to UI Messages Pin
neroknights8-Apr-03 4:04
neroknights8-Apr-03 4:04 
GeneralRe: Respond to UI Messages Pin
Nick Seng8-Apr-03 15:23
Nick Seng8-Apr-03 15:23 
GeneralError in .NET (regions) ??!! Pin
Wizard_014-Apr-03 3:38
Wizard_014-Apr-03 3:38 
GeneralRe: Error in .NET (regions) ??!! Pin
Chris Jobson4-Apr-03 10:57
Chris Jobson4-Apr-03 10:57 
GeneralRe: Error in .NET (regions) ??!! Pin
Wizard_014-Apr-03 21:58
Wizard_014-Apr-03 21:58 
GeneralTypes and XML Pin
Jon Newman4-Apr-03 3:17
Jon Newman4-Apr-03 3:17 
Right. As a feature in my Animation engine, I want to be able to read an XML file for frame information.
In the engine I have an enum for storing specific types of frames.

For example one being for where the bitmap of the frame is stored.

public enum BitmapLocations
{
   InExe,
   Filesystem
}


Now, I have a dataset for reading an XML file into. I can cast any standard types easily. Such as:
(string)row["name"]


But when it comes to this enum value, I keep getting an invalid cast exception. I've tried:

XML:
<location>InExe</location>

C#:
(BitmapLocation)row["location"]

And this throws the exception.

I've also tried assigning the enum values to a number and using that instead, but still no luck.

Any ideas?


"If you just say porn then you get all manner of chaff and low grade stuff."
- Paul Watson, Lounge 25 Mar 03
"But a fresh install - it's like having clean sheets"
- C. Maunder Lounge 3 Mar '03



Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
GeneralRe: Types and XML Pin
Stephane Rodriguez.4-Apr-03 6:46
Stephane Rodriguez.4-Apr-03 6:46 
QuestionHave components you want to sell? Pin
Roger Alsing4-Apr-03 0:57
Roger Alsing4-Apr-03 0:57 
GeneralUsing the capacity property of ArrayList Pin
Alex Iagovsky4-Apr-03 0:51
Alex Iagovsky4-Apr-03 0:51 

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.