Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
QuestionUsing C# like remote desktop? Pin
InvalidTypecast24-Sep-07 10:41
InvalidTypecast24-Sep-07 10:41 
AnswerRe: Using C# like remote desktop? Pin
TJoe25-Sep-07 6:05
TJoe25-Sep-07 6:05 
GeneralRe: Using C# like remote desktop? Pin
InvalidTypecast25-Sep-07 8:49
InvalidTypecast25-Sep-07 8:49 
QuestionC# relating to SET and GET Pin
Daniel Hood24-Sep-07 9:25
Daniel Hood24-Sep-07 9:25 
AnswerRe: C# relating to SET and GET Pin
pmarfleet24-Sep-07 9:36
pmarfleet24-Sep-07 9:36 
GeneralRe: C# relating to SET and GET Pin
Colin Angus Mackay24-Sep-07 10:40
Colin Angus Mackay24-Sep-07 10:40 
GeneralRe: C# relating to SET and GET Pin
Daniel Hood24-Sep-07 10:48
Daniel Hood24-Sep-07 10:48 
AnswerRe: C# relating to SET and GET Pin
Pete O'Hanlon24-Sep-07 9:36
mvePete O'Hanlon24-Sep-07 9:36 
get/set methods are called properties. They are syntactic sugar to allow you to hide the details of members, and provide the equivalents of methods to retrieve or set the value of those methods. So, what do I mean by this? Well you could view each get/set property as really being two methods; one is set_property and the other one is get_property.

Why would you do this? Well - properties allow you to encapsulate/hide members. Instead of providing you with direct access to the members, properties abstract your access. This means that you can leave implementation details for working with the members. For instance, suppose that you want to ensure that a string is of a certain length then you can do this like:
private string _myString;
public string MyString
{
  get { return _myString ; }
  set
  {
    if (value != null && value.Trim().Length > 30)
      value = value.Substring(0, 30);
    _myString = value;
  }
}


Deja View - the feeling that you've seen this post before.

GeneralRe: C# relating to SET and GET Pin
Daniel Hood24-Sep-07 10:46
Daniel Hood24-Sep-07 10:46 
GeneralRe: C# relating to SET and GET Pin
Pete O'Hanlon24-Sep-07 22:16
mvePete O'Hanlon24-Sep-07 22:16 
QuestionMS Application Block : SQLHelper [modified] Pin
ss.mmm24-Sep-07 9:08
ss.mmm24-Sep-07 9:08 
AnswerRe: MS Application Block : SQLHelper Pin
pmarfleet24-Sep-07 9:22
pmarfleet24-Sep-07 9:22 
QuestionSecuring PDF Files Pin
adnanrafiq24-Sep-07 9:04
adnanrafiq24-Sep-07 9:04 
QuestionCode for Traveling Salesman Problems Pin
laremtj24-Sep-07 8:58
laremtj24-Sep-07 8:58 
AnswerRe: Code for Traveling Salesman Problems Pin
Pete O'Hanlon24-Sep-07 9:06
mvePete O'Hanlon24-Sep-07 9:06 
GeneralRe: Code for Traveling Salesman Problems Pin
Paul Conrad24-Sep-07 13:26
professionalPaul Conrad24-Sep-07 13:26 
AnswerRe: Code for Traveling Salesman Problems Pin
Scott Dorman24-Sep-07 9:11
professionalScott Dorman24-Sep-07 9:11 
AnswerRe: Code for Traveling Salesman Problems Pin
Dan Neely24-Sep-07 9:48
Dan Neely24-Sep-07 9:48 
GeneralRe: Code for Traveling Salesman Problems Pin
Scott Dorman24-Sep-07 9:59
professionalScott Dorman24-Sep-07 9:59 
GeneralRe: Code for Traveling Salesman Problems Pin
Pete O'Hanlon24-Sep-07 10:01
mvePete O'Hanlon24-Sep-07 10:01 
AnswerRe: Code for Traveling Salesman Problems Pin
Paul Conrad24-Sep-07 13:26
professionalPaul Conrad24-Sep-07 13:26 
QuestionMapping CSV files Pin
jebin k24-Sep-07 7:14
jebin k24-Sep-07 7:14 
AnswerRe: Mapping CSV files Pin
martin_hughes24-Sep-07 9:35
martin_hughes24-Sep-07 9:35 
QuestionHow to make windows application like master page? Pin
Shahriat Hossain24-Sep-07 7:06
Shahriat Hossain24-Sep-07 7:06 
AnswerRe: How to make windows application like master page? Pin
Not Active24-Sep-07 7:39
mentorNot Active24-Sep-07 7:39 

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.