Click here to Skip to main content
14,267,320 members
   

C#

 
GeneralRe: Why is this necessary? Pin
Brian_TheLion16-May-19 16:44
memberBrian_TheLion16-May-19 16:44 
QuestionCan version 2015 of Visual Studio still be installed Pin
Brian_TheLion15-May-19 19:48
memberBrian_TheLion15-May-19 19:48 
AnswerRe: Can version 2015 of Visual Studio still be installed Pin
OriginalGriff15-May-19 20:07
protectorOriginalGriff15-May-19 20:07 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
Richard MacCutchan15-May-19 21:22
protectorRichard MacCutchan15-May-19 21:22 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
OriginalGriff15-May-19 21:39
protectorOriginalGriff15-May-19 21:39 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
Gerry Schmitz16-May-19 3:36
mveGerry Schmitz16-May-19 3:36 
QuestionSelecting the correct code Pin
Brian_TheLion15-May-19 15:25
memberBrian_TheLion15-May-19 15:25 
AnswerRe: Selecting the correct code Pin
BillWoodruff15-May-19 16:40
mveBillWoodruff15-May-19 16:40 
I'd like to suggest you do some study of what Fields, and Properties, are in C#. Note that in your examples above you never declare variables 'name and 'length.

Start here: [^], [^], [^]. And, listen to Jon Skeet: [^]

Properties are actually a form of Method, technically called an "accessor."

Before auto-properties came along ... in C# 3.0 ... ('set and 'get only), this was a canonical pattern for Properties:
private int _mInt;  // private backing store

public int MInt     // public property
{
    get { return _mInt; } set { _mInt = value; }
}
Now, when you write:
public int MInt { get; set; }
The private backing field is created behind the scenes. These two examples are, functionally, identical.

Some basic research and experimenting, now, will really benefit you.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot


modified 15-May-19 23:05pm.

GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 17:48
memberBrian_TheLion15-May-19 17:48 
GeneralRe: Selecting the correct code Pin
BillWoodruff15-May-19 18:00
mveBillWoodruff15-May-19 18:00 
GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 18:38
memberBrian_TheLion15-May-19 18:38 
GeneralRe: Selecting the correct code Pin
BillWoodruff15-May-19 22:14
mveBillWoodruff15-May-19 22:14 
GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 18:46
memberBrian_TheLion15-May-19 18:46 
AnswerRe: Selecting the correct code Pin
Richard MacCutchan15-May-19 21:26
protectorRichard MacCutchan15-May-19 21:26 
QuestionFormatting code to post on this discussion group Pin
Brian_TheLion15-May-19 15:01
memberBrian_TheLion15-May-19 15:01 
AnswerRe: Formatting code to post on this discussion group Pin
Dave Kreskowiak15-May-19 15:11
mveDave Kreskowiak15-May-19 15:11 
GeneralRe: Formatting code to post on this discussion group Pin
Brian_TheLion15-May-19 15:14
memberBrian_TheLion15-May-19 15:14 
QuestionHow to change screen resolution in secondary display? Pin
jrdnoland14-May-19 0:29
memberjrdnoland14-May-19 0:29 
SuggestionRe: How to change screen resolution in secondary display? Pin
CHill6014-May-19 1:11
protectorCHill6014-May-19 1:11 
QuestionString Line formating in C# Pin
anilkolla13-May-19 19:32
memberanilkolla13-May-19 19:32 
AnswerRe: String Line formating in C# Pin
OriginalGriff13-May-19 20:40
protectorOriginalGriff13-May-19 20:40 
GeneralRe: String Line formating in C# Pin
BillWoodruff13-May-19 23:32
mveBillWoodruff13-May-19 23:32 
GeneralRe: String Line formating in C# Pin
OriginalGriff13-May-19 23:38
protectorOriginalGriff13-May-19 23:38 
AnswerRe: String Line formating in C# Pin
Eddy Vluggen13-May-19 22:11
mveEddy Vluggen13-May-19 22:11 
AnswerRe: String Line formating in C# Pin
BillWoodruff13-May-19 23:28
mveBillWoodruff13-May-19 23:28 

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.