Click here to Skip to main content
15,893,923 members
Home / Discussions / C#
   

C#

 
GeneralRe: cant see my font in my C# WinForm program after install Pin
Eddy Vluggen17-Apr-15 8:36
professionalEddy Vluggen17-Apr-15 8:36 
GeneralRe: cant see my font in my C# WinForm program after install Pin
goldsoft18-Apr-15 19:33
goldsoft18-Apr-15 19:33 
Questionfor important Pin
eslam bakr16-Apr-15 3:59
eslam bakr16-Apr-15 3:59 
AnswerRe: for important Pin
Dave Kreskowiak16-Apr-15 4:29
mveDave Kreskowiak16-Apr-15 4:29 
AnswerRe: for important Pin
Arkadeep De16-Apr-15 8:53
professionalArkadeep De16-Apr-15 8:53 
GeneralRe: for important Pin
Dave Kreskowiak16-Apr-15 8:58
mveDave Kreskowiak16-Apr-15 8:58 
GeneralRe: for important Pin
Eddy Vluggen16-Apr-15 10:04
professionalEddy Vluggen16-Apr-15 10:04 
QuestionC# String Comparison Tests Pin
Kevin Marois16-Apr-15 3:09
professionalKevin Marois16-Apr-15 3:09 
I was just reading someone's blog where he tested
bool isEmpty = (MyString == "");

// also

bool isEmpty = string.IsNullOrEmpty(MyString);

// also

bool isEmpty = string.IsNullOrWhiteSpace(MyString);

// also

bool isEmpty = MyString.Equals("");

// also

bool isEmpty = MyString.Length == 0;

and he listed the number of ticks each example took.

That got me thinking....

If you wanted to know of a string was null, that's one thing, and determining if its an empty string is another.

But do you REALLY care about TICKS???

With today's PC's and Servers running at ultra high speed, why would anyone really care?

Bonus question: I prefer IsNullOrWhiteSpace. What's your favorite & why?
If it's not broken, fix it until it is

GeneralRe: C# String Comparison Tests Pin
harold aptroot16-Apr-15 3:23
harold aptroot16-Apr-15 3:23 
GeneralRe: C# String Comparison Tests Pin
Sascha Lefèvre16-Apr-15 6:56
professionalSascha Lefèvre16-Apr-15 6:56 
GeneralRe: C# String Comparison Tests Pin
harold aptroot16-Apr-15 7:40
harold aptroot16-Apr-15 7:40 
GeneralRe: C# String Comparison Tests Pin
Sascha Lefèvre16-Apr-15 8:29
professionalSascha Lefèvre16-Apr-15 8:29 
GeneralRe: C# String Comparison Tests Pin
harold aptroot16-Apr-15 8:38
harold aptroot16-Apr-15 8:38 
GeneralRe: C# String Comparison Tests Pin
Sascha Lefèvre16-Apr-15 8:51
professionalSascha Lefèvre16-Apr-15 8:51 
AnswerRe: C# String Comparison Tests Pin
Pete O'Hanlon16-Apr-15 3:30
mvePete O'Hanlon16-Apr-15 3:30 
GeneralRe: C# String Comparison Tests Pin
Kevin Marois16-Apr-15 3:32
professionalKevin Marois16-Apr-15 3:32 
GeneralRe: C# String Comparison Tests Pin
Pete O'Hanlon16-Apr-15 3:33
mvePete O'Hanlon16-Apr-15 3:33 
GeneralRe: C# String Comparison Tests Pin
Simon_Whale16-Apr-15 4:01
Simon_Whale16-Apr-15 4:01 
GeneralRe: C# String Comparison Tests Pin
Pete O'Hanlon16-Apr-15 4:28
mvePete O'Hanlon16-Apr-15 4:28 
GeneralRe: C# String Comparison Tests Pin
OriginalGriff16-Apr-15 4:52
mveOriginalGriff16-Apr-15 4:52 
GeneralRe: C# String Comparison Tests Pin
Pete O'Hanlon16-Apr-15 5:05
mvePete O'Hanlon16-Apr-15 5:05 
GeneralRe: C# String Comparison Tests Pin
Simon_Whale16-Apr-15 5:18
Simon_Whale16-Apr-15 5:18 
AnswerRe: C# String Comparison Tests Pin
Gyana_Ranjan Dash16-Apr-15 3:31
Gyana_Ranjan Dash16-Apr-15 3:31 
GeneralRe: C# String Comparison Tests Pin
Pete O'Hanlon16-Apr-15 8:29
mvePete O'Hanlon16-Apr-15 8:29 
AnswerRe: C# String Comparison Tests Pin
molesworth16-Apr-15 7:01
molesworth16-Apr-15 7:01 

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.