Click here to Skip to main content
15,899,024 members
Home / Discussions / C#
   

C#

 
AnswerRe: Big StructLayout question Pin
Guffa24-Sep-05 8:44
Guffa24-Sep-05 8:44 
QuestionC# articles Pin
CWinThread24-Sep-05 4:12
CWinThread24-Sep-05 4:12 
AnswerRe: C# articles Pin
Alex Cutovoi24-Sep-05 4:21
Alex Cutovoi24-Sep-05 4:21 
GeneralRe: C# articles Pin
CWinThread24-Sep-05 13:18
CWinThread24-Sep-05 13:18 
QuestionWhich is efficient? "" or string.Empty ? Pin
manivannan.p24-Sep-05 2:59
manivannan.p24-Sep-05 2:59 
AnswerRe: Which is efficient? "" or string.Empty ? Pin
mav.northwind24-Sep-05 3:17
mav.northwind24-Sep-05 3:17 
GeneralRe: Which is efficient? "" or string.Empty ? Pin
Guffa24-Sep-05 8:52
Guffa24-Sep-05 8:52 
GeneralRe: Which is efficient? "" or string.Empty ? Pin
mav.northwind24-Sep-05 9:29
mav.northwind24-Sep-05 9:29 
Not entirely correct, I think. I looked it up in IL.
Using the constant
string.Empty
compiles to
ldsfld string [mscorlib]System.String::Empty
whereas using
""
yields
ldstr ""

So I'd assume the runtime would have to check at least once whether mscorlib is loaded already (which is, of course) to be able to access a constant defined in a type from this assembly.

Using "" doesn't require this lookup, so it should be _a wee little bit_ faster, but, as I wrote, I don't think you'll be able to notice it.

Regards,
mav
GeneralRe: Which is efficient? "" or string.Empty ? Pin
leppie24-Sep-05 14:34
leppie24-Sep-05 14:34 
GeneralRe: Which is efficient? "" or string.Empty ? Pin
Guffa25-Sep-05 5:36
Guffa25-Sep-05 5:36 
GeneralRe: Which is efficient? "" or string.Empty ? Pin
Nick Parker24-Sep-05 9:22
protectorNick Parker24-Sep-05 9:22 
AnswerRe: Which is efficient? "" or string.Empty ? Pin
Judah Gabriel Himango24-Sep-05 10:37
sponsorJudah Gabriel Himango24-Sep-05 10:37 
AnswerRe: Which is efficient? "" or string.Empty ? Pin
Mohamad Al Husseiny25-Sep-05 8:12
Mohamad Al Husseiny25-Sep-05 8:12 
QuestionOpening Word in WebBrowser control and selecting some text Pin
mirano24-Sep-05 2:28
mirano24-Sep-05 2:28 
QuestionHow to get handles opened by the current process? Pin
Anonymous24-Sep-05 0:28
Anonymous24-Sep-05 0:28 
AnswerRe: How to get handles opened by the current process? Pin
Dave Kreskowiak24-Sep-05 16:04
mveDave Kreskowiak24-Sep-05 16:04 
Question5 years of C# and still no open projects... Pin
Anonymous23-Sep-05 23:39
Anonymous23-Sep-05 23:39 
AnswerRe: 5 years of C# and still no open projects... Pin
Nick Parker24-Sep-05 9:27
protectorNick Parker24-Sep-05 9:27 
QuestionHow to print two languages in the same line? Pin
moh_monir23-Sep-05 22:13
moh_monir23-Sep-05 22:13 
Questionget the calling function and class name Pin
Anonymous23-Sep-05 20:26
Anonymous23-Sep-05 20:26 
AnswerRe: get the calling function and class name Pin
Nick Parker24-Sep-05 9:45
protectorNick Parker24-Sep-05 9:45 
QuestionRegular expression help me Pin
rockxuyenmandem23-Sep-05 19:07
rockxuyenmandem23-Sep-05 19:07 
AnswerRe: Regular expression help me Pin
Alex Korchemniy23-Sep-05 20:00
Alex Korchemniy23-Sep-05 20:00 
AnswerRe: Regular expression help me Pin
Guffa23-Sep-05 21:12
Guffa23-Sep-05 21:12 
AnswerRe: Regular expression help me Pin
Daniel Grunwald23-Sep-05 22:44
Daniel Grunwald23-Sep-05 22:44 

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.