|
|
-
|
|
Today I found an interesting post from codeproject about for and foreach loop in programming. Its mentioned that for loop is efficient then foreach loop. So now onwards it is good practice to use for loop instead of foreach loop.......
|
|
-
|
|
In few scenarios, we might use types of other programming languages, and the operations on that type. But if those types are not recognized in compile-time, it will throw compile-time errors. By declaring the type as dynamic it will bypass compile time ......
|
|
-
|
|
The string's IndexOf methods are all case-sensitive. The Globalization namespace contains the CompareInfo class that includes a case-insensitive IndexOf method. we can use this by adding System.Globalization namespace. see below example.
[code]
void m......
|
|
-
|
|
While analyzing our c# application with fxcop, it showed us a message "Don't use c-style casting. Use UnBoxing in c#." A quick search in google reveals the below difference. With c-style casting, even if the source object is not from same as destinatio......
|
|
-
|
|
While browsing Scott Gu's website, found this. Nuget is a free, opensource package management system for .Net platform, which simplifies the process of incorporating various third party libraries into .net application. It offers a lot of packages, you c......
|
|
-
|
|
Just learned from Scott Gu's blog that VS 2010 provides more debuggin capabilities like
Run to Cursor - In general, we will keep the breakpoint very early in the code and from then we will press F10/F11 keys to reach to the actual location. Then, ......
|
|
-
|
|
Just learned that, we can make panel looks like a fieldset by setting "GroupingText" property for it.
[code]
<asp:Panel ID="pnlRecentQuestions" runat="server" GroupingText="Recent Questions">
<table>
.............
......
|
|
-
|
|
Private static readonly is today the preferred way to create a singleton in C#, but it don't have much laziness. You can implement it with a nested class, but with C#4 you can directly use the System.Lazy<T> class. Here is the model of the impleme......
|
|
-
|
|
I just learned from Eric Lippert blog that, its incorrect that value types are always stored in stack. It was interesting to learn that "Value types can be stored in the heap as well"......
|
|
-
|
|
Visual Studio Ultimate editions have application design support using the “Architecture” menu in the Menu bar. In an Enterprise setup, it is often the case that a solution designer expresses intent of the solution using UML Class diagrams, Sequence Dia...
|
|