Click here to Skip to main content
14,449,338 members
   

C#

 
GeneralRe: Why is this necessary? Pin
Brian_TheLion16-May-19 15:47
MemberBrian_TheLion16-May-19 15:47 
GeneralRe: Why is this necessary? Pin
Brian_TheLion16-May-19 17:44
MemberBrian_TheLion16-May-19 17:44 
QuestionCan version 2015 of Visual Studio still be installed Pin
Brian_TheLion15-May-19 20:48
MemberBrian_TheLion15-May-19 20:48 
AnswerRe: Can version 2015 of Visual Studio still be installed Pin
OriginalGriff15-May-19 21:07
communityengineerOriginalGriff15-May-19 21:07 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
Richard MacCutchan15-May-19 22:22
communityengineerRichard MacCutchan15-May-19 22:22 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
OriginalGriff15-May-19 22:39
communityengineerOriginalGriff15-May-19 22:39 
GeneralRe: Can version 2015 of Visual Studio still be installed Pin
Gerry Schmitz16-May-19 4:36
mveGerry Schmitz16-May-19 4:36 
QuestionSelecting the correct code Pin
Brian_TheLion15-May-19 16:25
MemberBrian_TheLion15-May-19 16:25 
I have been studying C#. When writing C# code I seem to have three types of code I could use for variables but are not certain when I need to use the code.

I could type this
Code One

<pre>public string Name
{
get;
set;
}</pre>

or I could type
Code Two

<pre>public string Name
{
get
{
return name;
}
set
{
name = value;
}</pre>

or I could type
Code Three

<pre>public void SetLength (double len)
{
length = len
}</pre>

And sometimes Code One and Code Three are used.
I think that one of these codes are used if I make the Variables private instead of public.

Any help would be welcome thanks

Brian
AnswerRe: Selecting the correct code Pin
BillWoodruff15-May-19 17:40
mveBillWoodruff15-May-19 17:40 
GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 18:48
MemberBrian_TheLion15-May-19 18:48 
GeneralRe: Selecting the correct code Pin
BillWoodruff15-May-19 19:00
mveBillWoodruff15-May-19 19:00 
GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 19:38
MemberBrian_TheLion15-May-19 19:38 
GeneralRe: Selecting the correct code Pin
BillWoodruff15-May-19 23:14
mveBillWoodruff15-May-19 23:14 
GeneralRe: Selecting the correct code Pin
Brian_TheLion15-May-19 19:46
MemberBrian_TheLion15-May-19 19:46 
AnswerRe: Selecting the correct code Pin
Richard MacCutchan15-May-19 22:26
communityengineerRichard MacCutchan15-May-19 22:26 
QuestionFormatting code to post on this discussion group Pin
Brian_TheLion15-May-19 16:01
MemberBrian_TheLion15-May-19 16:01 
AnswerRe: Formatting code to post on this discussion group Pin
Dave Kreskowiak15-May-19 16:11
mveDave Kreskowiak15-May-19 16:11 
GeneralRe: Formatting code to post on this discussion group Pin
Brian_TheLion15-May-19 16:14
MemberBrian_TheLion15-May-19 16:14 
QuestionHow to change screen resolution in secondary display? Pin
jrdnoland14-May-19 1:29
Memberjrdnoland14-May-19 1:29 
SuggestionRe: How to change screen resolution in secondary display? Pin
CHill6014-May-19 2:11
mveCHill6014-May-19 2:11 
QuestionString Line formating in C# Pin
anilkolla13-May-19 20:32
Memberanilkolla13-May-19 20:32 
AnswerRe: String Line formating in C# Pin
OriginalGriff13-May-19 21:40
communityengineerOriginalGriff13-May-19 21:40 
GeneralRe: String Line formating in C# Pin
BillWoodruff14-May-19 0:32
mveBillWoodruff14-May-19 0:32 
GeneralRe: String Line formating in C# Pin
OriginalGriff14-May-19 0:38
communityengineerOriginalGriff14-May-19 0:38 
AnswerRe: String Line formating in C# Pin
Eddy Vluggen13-May-19 23:11
professionalEddy Vluggen13-May-19 23:11 

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.