CSharpFeeds - All your C# feeds in one place.

Thursday, May 31, 2007

String.Compare() != String.Equals() [Josh Free]

by BCLTeam via BCL Team Blog on 5/31/2007 6:22:00 PM

System.String contains the static methods ‘Compare’ and ‘Equals’ which are used for string comparison. public static int Compare(string strA, string strB) public static bool Equals(string a, string b) These two methods perform two very different kinds of comparisons.  Developers routinely confuse String.Compare with String.Equals and use the methods interchangeably.  The use of the wrong method can lead to security and globalization issues. So what’s the difference?  String.Compar ...

[ read more ]

Simple Lazy Loading

by Brendan via Brendan Enrick on 5/31/2007 3:06:00 PM

Lately, I’ve noticed a lot of people who are not careful about how they load objects. Managing objects is a fundamentally important part of software development. Lets say for example I have an integer in the query string, and I need to use this number in a few places on my page. Well it is obviously inefficient and an ugly process to check the query string and parse the value into an integer every time I want to access that number. I could also at the beginning just grab the number, but th ...

[ read more ]

More on Partial Methods

by wesdyer via Yet Another Language Geek on 5/31/2007 8:34:45 AM

Thank you everyone for the feedback.  If you have any more to say then please do express your opinion (and yes it is valued ;).  I think there has been a bit of misunderstanding about what partial methods really are.  So let's set the matter straight.  Here is the current spec (quoting from here on out): Partial methods are a new feature complementing partial classes with the option of declaring “hook” – or compile time events – in the code. Here is an example partial clas ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us