Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
Generalauthenticate in activeMQ using Spring.Nmstemplate in .net Pin
alfhv11-Aug-11 5:34
alfhv11-Aug-11 5:34 
QuestionUSB current value with C# Pin
yury dorofeev11-Aug-11 5:23
yury dorofeev11-Aug-11 5:23 
QuestionC# OOP: sub-property? Pin
Goalie3511-Aug-11 5:12
Goalie3511-Aug-11 5:12 
GeneralRe: C# OOP: sub-property? PinPopular
David198711-Aug-11 5:16
David198711-Aug-11 5:16 
GeneralRe: C# OOP: sub-property? Pin
Pete O'Hanlon11-Aug-11 9:27
mvePete O'Hanlon11-Aug-11 9:27 
GeneralRe: C# OOP: sub-property? Pin
David198711-Aug-11 21:09
David198711-Aug-11 21:09 
GeneralRe: C# OOP: sub-property? Pin
Shameel11-Aug-11 22:26
professionalShameel11-Aug-11 22:26 
AnswerRe: C# OOP: sub-property? PinPopular
Pete O'Hanlon11-Aug-11 5:23
mvePete O'Hanlon11-Aug-11 5:23 
As your code currently stands, you can't. What you need to do is create a class that Model implements (let's call it the Model class). Now, in this Model class, you'll have your Color property, so you end up with something like the following:
C#
public class Cars
{
  public Model Model { get; set; }
  public string Year { get; set; }
}
public class Model
{
  public string Color { get; set; }
}
Now, a couple of things to consider here. First of all, you shouldn't be using a string for the Year property - it's really a number. Secondly, you shouldn't really call your class Cars - it's describing a single car, so it should really be called Car.

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


AnswerRe: C# OOP: sub-property? Pin
PIEBALDconsult15-Aug-11 3:05
mvePIEBALDconsult15-Aug-11 3:05 
QuestionOpen web page from C# WinForms Pin
dipuks11-Aug-11 4:09
dipuks11-Aug-11 4:09 
AnswerRe: Open web page from C# WinForms Pin
Eddy Vluggen11-Aug-11 6:18
professionalEddy Vluggen11-Aug-11 6:18 
QuestionIssues in using Observable<T> to fire Property notification events (WinForms) [modified] Pin
BillWoodruff11-Aug-11 3:45
professionalBillWoodruff11-Aug-11 3:45 
AnswerRe: Issues in using Observable<T> to fire Property notification events (WinForms) Pin
BobJanova11-Aug-11 22:27
BobJanova11-Aug-11 22:27 
GeneralRe: Issues in using Observable&lt;T&gt; to fire Property notification events (WinForms) Pin
BillWoodruff11-Aug-11 23:23
professionalBillWoodruff11-Aug-11 23:23 
GeneralRe: Issues in using Observable<T> to fire Property notification events (WinForms) Pin
BobJanova11-Aug-11 23:57
BobJanova11-Aug-11 23:57 
GeneralRe: Issues in using Observable to fire Property notification events (WinForms) Pin
BillWoodruff12-Aug-11 12:27
professionalBillWoodruff12-Aug-11 12:27 
GeneralRe: Issues in using Observable<T> to fire Property notification events (WinForms) Pin
Pete O'Hanlon12-Aug-11 0:15
mvePete O'Hanlon12-Aug-11 0:15 
GeneralRe: Issues in using Observable to fire Property notification events (WinForms) Pin
BobJanova12-Aug-11 2:48
BobJanova12-Aug-11 2:48 
GeneralRe: Issues in using Observable to fire Property notification events (WinForms) Pin
BillWoodruff12-Aug-11 12:29
professionalBillWoodruff12-Aug-11 12:29 
Questionproblem with process.waitforexit(timeout) Pin
pprasanthk11-Aug-11 3:37
pprasanthk11-Aug-11 3:37 
AnswerRe: problem with process.waitforexit(timeout) Pin
Not Active11-Aug-11 4:27
mentorNot Active11-Aug-11 4:27 
GeneralRe: problem with process.waitforexit(timeout) Pin
pprasanthk11-Aug-11 5:41
pprasanthk11-Aug-11 5:41 
GeneralRe: problem with process.waitforexit(timeout) Pin
Not Active11-Aug-11 5:58
mentorNot Active11-Aug-11 5:58 
GeneralRe: problem with process.waitforexit(timeout) Pin
pprasanthk11-Aug-11 7:02
pprasanthk11-Aug-11 7:02 
GeneralRe: problem with process.waitforexit(timeout) Pin
Not Active11-Aug-11 7:32
mentorNot Active11-Aug-11 7: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.