Click here to Skip to main content
16,006,001 members
Home / Discussions / C#
   

C#

 
AnswerRe: dataset in c# Pin
Mairaaj Khan17-Dec-06 21:10
professionalMairaaj Khan17-Dec-06 21:10 
GeneralRe: datahandler in c# Pin
Fuhrer17-Dec-06 21:19
Fuhrer17-Dec-06 21:19 
Questionpublish problem with C# express 2005 Pin
Argus217-Dec-06 10:29
Argus217-Dec-06 10:29 
AnswerRe: publish problem with C# express 2005 Pin
qingfengliuyue22-Apr-09 21:17
qingfengliuyue22-Apr-09 21:17 
Questionabout arraylist Pin
loscarlitos17-Dec-06 9:33
loscarlitos17-Dec-06 9:33 
AnswerRe: about arraylist Pin
Pradipta Basu17-Dec-06 9:53
Pradipta Basu17-Dec-06 9:53 
GeneralRe: about arraylist Pin
loscarlitos17-Dec-06 10:06
loscarlitos17-Dec-06 10:06 
GeneralRe: about arraylist Pin
Larantz17-Dec-06 10:16
Larantz17-Dec-06 10:16 
foreach(object part in carParts)
{
   if(part is motor)
      (part as motor).Cylinders = 12;

   if(part is window)
      (part as window).Electric = true;
}


Cast it to access the properties.
Or store the object to a new variable.
For instance:

Motor newMotor = null;

if(part is Motor)
   newMotor = (part as Motor);

if(newMotor != null)
{
   //access properties via newMotor object
}


-Larantz-

for those about to code, we salute you
http://www.tellus-software.com

AnswerRe: about arraylist Pin
DavidNohejl17-Dec-06 10:40
DavidNohejl17-Dec-06 10:40 
GeneralRe: about arraylist Pin
J4amieC17-Dec-06 22:34
J4amieC17-Dec-06 22:34 
GeneralRe: about arraylist Pin
DavidNohejl18-Dec-06 1:16
DavidNohejl18-Dec-06 1:16 
GeneralRe: about arraylist Pin
J4amieC18-Dec-06 1:18
J4amieC18-Dec-06 1:18 
GeneralRe: about arraylist Pin
DavidNohejl18-Dec-06 1:50
DavidNohejl18-Dec-06 1:50 
QuestionExtracting/Compressing .grf file Pin
AesopTurtle17-Dec-06 8:09
AesopTurtle17-Dec-06 8:09 
QuestionWhen to choose Windows Application or Console Application Pin
ComCoderCsharp17-Dec-06 7:33
ComCoderCsharp17-Dec-06 7:33 
AnswerRe: When to choose Windows Application or Console Application Pin
Nader Elshehabi17-Dec-06 8:38
Nader Elshehabi17-Dec-06 8:38 
AnswerRe: When to choose Windows Application or Console Application Pin
Ed.Poore17-Dec-06 8:39
Ed.Poore17-Dec-06 8:39 
AnswerRe: When to choose Windows Application or Console Application Pin
Daniel Grunwald17-Dec-06 10:03
Daniel Grunwald17-Dec-06 10:03 
Generalthanks a lot Pin
ComCoderCsharp17-Dec-06 13:26
ComCoderCsharp17-Dec-06 13:26 
QuestionFormClosingEvent Pin
h@s@n17-Dec-06 6:18
h@s@n17-Dec-06 6:18 
AnswerRe: FormClosingEvent Pin
Stefan Troschuetz17-Dec-06 6:26
Stefan Troschuetz17-Dec-06 6:26 
GeneralRe: FormClosingEvent Pin
h@s@n17-Dec-06 6:38
h@s@n17-Dec-06 6:38 
GeneralRe: FormClosingEvent Pin
Luc Pattyn17-Dec-06 6:51
sitebuilderLuc Pattyn17-Dec-06 6:51 
GeneralRe: FormClosingEvent Pin
h@s@n17-Dec-06 6:57
h@s@n17-Dec-06 6:57 
GeneralRe: FormClosingEvent Pin
Luis Alonso Ramos17-Dec-06 16:35
Luis Alonso Ramos17-Dec-06 16:35 

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.