Click here to Skip to main content
16,021,765 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serialization Question Pin
Marcus Spitzmiller25-Feb-03 14:34
Marcus Spitzmiller25-Feb-03 14:34 
QuestionIssue an HLT instruction from C# ? Pin
Andrew McCarter24-Feb-03 5:20
Andrew McCarter24-Feb-03 5:20 
GeneralHelp needed!! Capturing key in for loops. Pin
Karman24-Feb-03 5:11
Karman24-Feb-03 5:11 
GeneralRe: Help needed!! Capturing key in for loops. Pin
Paul Riley24-Feb-03 5:20
Paul Riley24-Feb-03 5:20 
QuestionCast to a type obtained with GetType??? Pin
Don Miguel24-Feb-03 4:36
Don Miguel24-Feb-03 4:36 
AnswerRe: Cast to a type obtained with GetType??? Pin
leppie24-Feb-03 5:58
leppie24-Feb-03 5:58 
GeneralRe: Cast to a type obtained with GetType??? Pin
Don Miguel24-Feb-03 6:03
Don Miguel24-Feb-03 6:03 
GeneralRe: Cast to a type obtained with GetType??? Pin
leppie24-Feb-03 6:27
leppie24-Feb-03 6:27 
Don Miguel wrote:
how is that???? I don't understand

What exactly is the point of this code?

Type t = Type.GetType(my_StringT); 
Object my_NewType = (t) my_OldType; 

Line 1: You are getting a Type object called my_StringT. Fair.
Line 2: Now this line screams of errors! lets start right to left.
- what is my_OldType? OK, the compiler cant assume, but I can. Is it a Type object or an instance of that Type? See?
- (t) . You can only cast to a type. Is t a type? No, it is a Type object. A class name is a type.
- Object my_NewType: Why are you casting in the first place? All objects downcast automatically to their parent types, iow object.Just like most OO languages, everything is an object of type Object (the root/parent/mother class).

Now think again what your are trying to do, and if in fact it is necessary. You get what I am saying? Poke tongue | ;-P Feel free to ask some more questions.

Cheers

MyDUMeter: a .NET DUMeter clone
"Thats like saying "hahahaha he doesnt know the difference between a cyberneticradioactivenuclothermolopticdimswitch and a biocontainingspherogramotron", but with words you have really never heard of."
GeneralRe: Cast to a type obtained with GetType??? Pin
Don Miguel24-Feb-03 6:44
Don Miguel24-Feb-03 6:44 
GeneralRe: Cast to a type obtained with GetType??? Pin
leppie24-Feb-03 6:49
leppie24-Feb-03 6:49 
GeneralProperty Browser: How to add more than one Property Tab Pin
Umair Ahmad24-Feb-03 3:20
Umair Ahmad24-Feb-03 3:20 
QuestionHow to use IHtmlPainter,IElementBehavior with C# Pin
gxuqin24-Feb-03 2:19
gxuqin24-Feb-03 2:19 
GeneralCommand in VS.NET Addin problem Pin
mfa24-Feb-03 1:03
mfa24-Feb-03 1:03 
Questionhow to move the shape from one position to another. Pin
chiou23-Feb-03 22:50
chiou23-Feb-03 22:50 
AnswerRe: how to move the shape from one position to another. Pin
Furty23-Feb-03 23:47
Furty23-Feb-03 23:47 
Generalfilestream question Pin
jtmtv1823-Feb-03 21:22
jtmtv1823-Feb-03 21:22 
GeneralRe: filestream question Pin
Furty23-Feb-03 23:02
Furty23-Feb-03 23:02 
GeneralRe: filestream question Pin
jtmtv1824-Feb-03 9:34
jtmtv1824-Feb-03 9:34 
GeneralTrackbar Pin
grv57523-Feb-03 18:59
grv57523-Feb-03 18:59 
GeneralRe: Trackbar Pin
Furty23-Feb-03 23:23
Furty23-Feb-03 23:23 
Questionhow to draw an arrow Pin
chiou23-Feb-03 18:24
chiou23-Feb-03 18:24 
AnswerRe: how to draw an arrow Pin
Furty23-Feb-03 22:57
Furty23-Feb-03 22:57 
AnswerRe: how to draw an arrow Pin
SimonS23-Feb-03 23:56
SimonS23-Feb-03 23:56 
GeneralRe: how to draw an arrow Pin
Roger Alsing24-Feb-03 4:22
Roger Alsing24-Feb-03 4:22 
GeneralRe: how to draw an arrow Pin
Philip Fitzsimons24-Feb-03 9:32
Philip Fitzsimons24-Feb-03 9:32 

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.