Click here to Skip to main content
15,888,286 members
Home / Discussions / C#
   

C#

 
GeneralRe: USB port Pin
Member 1198669116-Sep-15 15:54
Member 1198669116-Sep-15 15:54 
AnswerRe: USB port Pin
Eddy Vluggen17-Sep-15 22:54
professionalEddy Vluggen17-Sep-15 22:54 
QuestionDynamicly created ErrorProvider and garbage collection Pin
TMattC14-Sep-15 20:37
TMattC14-Sep-15 20:37 
AnswerRe: Dynamicly created ErrorProvider and garbage collection Pin
Eddy Vluggen14-Sep-15 23:36
professionalEddy Vluggen14-Sep-15 23:36 
QuestionRe-Get and Set Property Pin
Member 1116162514-Sep-15 20:02
Member 1116162514-Sep-15 20:02 
AnswerRe: Get and Set Property Pin
Peter Leow14-Sep-15 20:27
professionalPeter Leow14-Sep-15 20:27 
AnswerRe: Get and Set Property Pin
OriginalGriff14-Sep-15 21:40
mveOriginalGriff14-Sep-15 21:40 
AnswerRe: Get and Set Property Pin
V.14-Sep-15 21:52
professionalV.14-Sep-15 21:52 
a small example on top of the previous answers.

Think of a car, it has properties like color, max speed, current speed, number of wheels, ...
A car can also do stuff like accelerate, turn, ...

If you would put this in the code, the properties would be put in variables and exposed via properties (get/set). Accelerate and turn are actions that are translated into methods.

Some properties can only be set when instantiating the class, eg number of wheels and maxspeed. Some can be changed from outside: You can repaint the car eg. Some can never be changed (number of wheels) and some can only be changed by using a method. (Accelerate will change the current speed and a check will prevent it from becoming higher than the max speed property).

The inner workings of properties and methods are never exposed. eg. the check where the current speed is never higher than the max speed could reside in the accelerate method or in the current speed property itself.

Read up on "encapsulation" for more info.

Hope this helps.
V.

(MQOTD rules and previous solutions)

AnswerRe: Get and Set Property Pin
BillWoodruff15-Sep-15 0:42
professionalBillWoodruff15-Sep-15 0:42 
Questionhow to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx? Pin
Member 1198440814-Sep-15 19:06
Member 1198440814-Sep-15 19:06 
GeneralRe: how to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx? Pin
Richard MacCutchan14-Sep-15 21:33
mveRichard MacCutchan14-Sep-15 21:33 
AnswerRe: how to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx? Pin
Mycroft Holmes14-Sep-15 21:37
professionalMycroft Holmes14-Sep-15 21:37 
AnswerRe: how to compare two data tables having same column and contain some values according to column name using stored procedure in sql dbx? Pin
ngoj17-Sep-15 3:13
ngoj17-Sep-15 3:13 
Questionseprating axis swept; Pin
Isawyouoo14-Sep-15 12:58
Isawyouoo14-Sep-15 12:58 
QuestionRe: seprating axis swept; Pin
Matt T Heffron14-Sep-15 13:17
professionalMatt T Heffron14-Sep-15 13:17 
AnswerRe: seprating axis swept; Pin
Isawyouoo14-Sep-15 13:57
Isawyouoo14-Sep-15 13:57 
QuestionUrgently need C# code for pushing files from one server to another server Pin
Naga Nanda Kishore14-Sep-15 6:59
Naga Nanda Kishore14-Sep-15 6:59 
AnswerRe: Urgently need C# code for pushing files from one server to another server Pin
Eddy Vluggen14-Sep-15 7:29
professionalEddy Vluggen14-Sep-15 7:29 
AnswerRe: Urgently need C# code for pushing files from one server to another server Pin
OriginalGriff14-Sep-15 8:09
mveOriginalGriff14-Sep-15 8:09 
AnswerRe: Urgently need C# code for pushing files from one server to another server Pin
Gerry Schmitz14-Sep-15 9:26
mveGerry Schmitz14-Sep-15 9:26 
JokeRe: Urgently need C# code for pushing files from one server to another server Pin
Eddy Vluggen14-Sep-15 9:38
professionalEddy Vluggen14-Sep-15 9:38 
GeneralRe: Urgently need C# code for pushing files from one server to another server Pin
Gerry Schmitz14-Sep-15 9:54
mveGerry Schmitz14-Sep-15 9:54 
GeneralRe: Urgently need C# code for pushing files from one server to another server Pin
Eddy Vluggen14-Sep-15 10:05
professionalEddy Vluggen14-Sep-15 10:05 
GeneralRe: Urgently need C# code for pushing files from one server to another server Pin
Gerry Schmitz14-Sep-15 10:29
mveGerry Schmitz14-Sep-15 10:29 
QuestionSerializing a Dictionary of Items where the Value member is a List of instances of an Interface Pin
BillWoodruff14-Sep-15 5:06
professionalBillWoodruff14-Sep-15 5:06 

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.