Click here to Skip to main content
16,013,516 members
Home / Discussions / C#
   

C#

 
GeneralRe: String.empty v.s. string.null Pin
George_George19-Jun-08 22:50
George_George19-Jun-08 22:50 
GeneralRe: String.empty v.s. string.null Pin
George_George19-Jun-08 22:49
George_George19-Jun-08 22:49 
GeneralRe: String.empty v.s. string.null Pin
Zoltan Balazs20-Jun-08 1:12
Zoltan Balazs20-Jun-08 1:12 
GeneralRe: String.empty v.s. string.null Pin
George_George20-Jun-08 4:00
George_George20-Jun-08 4:00 
GeneralRe: String.empty v.s. string.null Pin
Rutvik Dave19-Jun-08 9:22
professionalRutvik Dave19-Jun-08 9:22 
GeneralRe: String.empty v.s. string.null Pin
George_George19-Jun-08 22:53
George_George19-Jun-08 22:53 
GeneralRe: String.empty v.s. string.null Pin
George_George19-Jun-08 22:45
George_George19-Jun-08 22:45 
GeneralRe: String.empty v.s. string.null Pin
Colin Angus Mackay20-Jun-08 7:07
Colin Angus Mackay20-Jun-08 7:07 
George_George wrote:
What do you mean "It is not copied, it is referenced"? Could you show some pseude code please?


You have two types of objects. Value types and Reference types. Value types are always copied when you pass them around. Reference types are always passed by reference.

You can think of references in code like the references in academic papers. When you read an academic paper you may come across a reference that reads like this [GoF1994]. When you turn to the end of the paper you will see listed all the references. The reference [GoF1994] may be used several times throughout the paper, but it always points to the same item in the list at the end.

If it was copied all the time you wouldn't have a reference and you would have stuff like this copied throughout the paper [Gang of Four, Effective Design Patterns, 1994, Addison Wesley]. By copying the source paper everywhere the academic paper just got much larger. However, a reference can be used to quickly note what academic paper is being used as the source. The reference points to the full detail somewhere else rather than have the full detail repeated constantly.


GeneralRe: String.empty v.s. string.null Pin
George_George23-Jun-08 23:44
George_George23-Jun-08 23:44 
GeneralRe: String.empty v.s. string.null Pin
Colin Angus Mackay20-Jun-08 7:11
Colin Angus Mackay20-Jun-08 7:11 
GeneralRe: String.empty v.s. string.null Pin
George_George23-Jun-08 23:47
George_George23-Jun-08 23:47 
AnswerRe: String.empty v.s. string.null Pin
User 665819-Jun-08 4:32
User 665819-Jun-08 4:32 
GeneralRe: String.empty v.s. string.null Pin
George_George19-Jun-08 22:55
George_George19-Jun-08 22:55 
QuestionChange the table cell background color Pin
dayakar_dn19-Jun-08 3:31
dayakar_dn19-Jun-08 3:31 
AnswerRe: Change the table cell background color Pin
leppie19-Jun-08 3:42
leppie19-Jun-08 3:42 
Questionhow can I get a running process start-path? Pin
fateme_developer19-Jun-08 1:59
fateme_developer19-Jun-08 1:59 
AnswerRe: how can I get a running process start-path? Pin
Bert delaVega19-Jun-08 2:32
Bert delaVega19-Jun-08 2:32 
AnswerRe: how can I get a running process start-path? Pin
Giorgi Dalakishvili19-Jun-08 2:36
mentorGiorgi Dalakishvili19-Jun-08 2:36 
Questioncreating word document using c#/ vb/ crystal reports Pin
Puneri19-Jun-08 1:41
Puneri19-Jun-08 1:41 
QuestionMicrosoft Reporting Services and C# Pin
jgrogan19-Jun-08 1:24
jgrogan19-Jun-08 1:24 
AnswerRe: Microsoft Reporting Services and C# Pin
carbon_golem19-Jun-08 2:17
carbon_golem19-Jun-08 2:17 
GeneralRe: Microsoft Reporting Services and C# Pin
jgrogan19-Jun-08 3:33
jgrogan19-Jun-08 3:33 
GeneralRe: Microsoft Reporting Services and C# Pin
carbon_golem19-Jun-08 4:37
carbon_golem19-Jun-08 4:37 
Questioninstantiate generic list Pin
henze7519-Jun-08 0:38
henze7519-Jun-08 0:38 
AnswerRe: instantiate generic list Pin
N a v a n e e t h19-Jun-08 1:15
N a v a n e e t h19-Jun-08 1:15 

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.