Click here to Skip to main content
14,636,351 members
Home » Discussions » C#
   

C#

 
GeneralRe: Editor, Visualization, C# Pin
CalinNegru(fearless_)1-Apr-20 22:49
MemberCalinNegru(fearless_)1-Apr-20 22:49 
QuestionEuropean Car plate recognition Pin
Member 1478897131-Mar-20 22:20
MemberMember 1478897131-Mar-20 22:20 
AnswerRe: European Car plate recognition Pin
OriginalGriff31-Mar-20 22:42
mveOriginalGriff31-Mar-20 22:42 
QuestionMemory Management in Unit Testing Pin
User-862169531-Mar-20 19:20
MemberUser-862169531-Mar-20 19:20 
AnswerRe: Memory Management in Unit Testing Pin
Richard MacCutchan31-Mar-20 21:04
mveRichard MacCutchan31-Mar-20 21:04 
AnswerRe: Memory Management in Unit Testing Pin
Pete O'Hanlon1-Apr-20 0:24
subeditorPete O'Hanlon1-Apr-20 0:24 
AnswerRe: Memory Management in Unit Testing Pin
F-ES Sitecore1-Apr-20 1:38
mveF-ES Sitecore1-Apr-20 1:38 
QuestionReference Types v. Value Types Pin
Richard Andrew x6431-Mar-20 10:52
professionalRichard Andrew x6431-Mar-20 10:52 
the .NET String class is a reference type, correct?

Why then must I add the ref keyword to a string argument if I want its value to be updated in the called function?

No other reference type behaves this way, correct?

Confused | :confused:

UPDATE: I just realized what's going on. Strings are immutable so when you pass a string with the ref keyword, it's the original reference to the string that is being updated with the new string. Without the ref keyword, the called function gets its own reference to the string, and if changes are made, then it's the function's reference that is updated, not the original reference. Smile | :)



The difficult we do right away...
...the impossible takes slightly longer.

AnswerRe: Reference Types v. Value Types Pin
OriginalGriff31-Mar-20 11:42
mveOriginalGriff31-Mar-20 11:42 
AnswerRe: Reference Types v. Value Types Pin
BillWoodruff31-Mar-20 12:31
mveBillWoodruff31-Mar-20 12:31 
GeneralRe: Reference Types v. Value Types Pin
Richard Andrew x6431-Mar-20 13:38
professionalRichard Andrew x6431-Mar-20 13:38 
GeneralRe: Reference Types v. Value Types Pin
BillWoodruff31-Mar-20 18:38
mveBillWoodruff31-Mar-20 18:38 
AnswerRe: Reference Types v. Value Types Pin
F-ES Sitecore1-Apr-20 1:19
mveF-ES Sitecore1-Apr-20 1:19 
GeneralRe: Reference Types v. Value Types Pin
Richard Deeming1-Apr-20 2:20
mveRichard Deeming1-Apr-20 2:20 
GeneralRe: Reference Types v. Value Types Pin
F-ES Sitecore1-Apr-20 2:38
mveF-ES Sitecore1-Apr-20 2:38 
QuestionOverloaded Methods with Generics Pin
#realJSOP30-Mar-20 5:52
mva#realJSOP30-Mar-20 5:52 
AnswerRe: Overloaded Methods with Generics Pin
OriginalGriff30-Mar-20 6:34
mveOriginalGriff30-Mar-20 6:34 
GeneralRe: Overloaded Methods with Generics Pin
#realJSOP30-Mar-20 6:50
mva#realJSOP30-Mar-20 6:50 
GeneralRe: Overloaded Methods with Generics Pin
OriginalGriff30-Mar-20 8:28
mveOriginalGriff30-Mar-20 8:28 
GeneralRe: Overloaded Methods with Generics Pin
#realJSOP31-Mar-20 0:21
mva#realJSOP31-Mar-20 0:21 
AnswerRe: Overloaded Methods with Generics Pin
BillWoodruff30-Mar-20 16:33
mveBillWoodruff30-Mar-20 16:33 
GeneralRe: Overloaded Methods with Generics Pin
#realJSOP31-Mar-20 0:18
mva#realJSOP31-Mar-20 0:18 
GeneralRe: Overloaded Methods with Generics Pin
BillWoodruff31-Mar-20 5:17
mveBillWoodruff31-Mar-20 5:17 
AnswerRe: Overloaded Methods with Generics Pin
Richard Deeming31-Mar-20 1:26
mveRichard Deeming31-Mar-20 1:26 
GeneralRe: Overloaded Methods with Generics Pin
BillWoodruff31-Mar-20 5:32
mveBillWoodruff31-Mar-20 5: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.