-->
Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Dec 19, 2014

Single | or & Vs Double || or &&

Single | or & Vs Double || or &&
S.NoSingle | or &Double || or &&
1Bitwise Comparison. Logical Comparison.

Jun 27, 2014

Constants Vs Read-only

Constants Vs Read-only
S.NoConstantsRead-only
1Constants are dealt with at compile-time.Read-only variables are evaluated at runtime.
2Constants supports value-type variables.Read-only variables can hold reference type variables.
3Constants should be used when it is very unlikely that the value will ever change.Read-only variables should be used when run-time calculation is required.

Jun 21, 2014

Dynamic vs Anonymous Type

. Dynamic vs Anonymous Type
S.NoParticularsDynamicAnonymous types
1Run timeDynamic types work at run time by late binding of object properties.Anonymous types cause the compile time errors.
2KeywordDynamic KeywordVar Keyword.

Jun 8, 2014

IENUMERABLE vs IQUERYABLE

IENUMERABLE vs IQUERYABLE
S.NoParticularsIENUMERABLEIQUERYABLE
1NamespaceSystem.CollectionsSystem.Linq
2Suitable forLINQ to Object and LINQ to XML.LINQ to SQL.
3custom querydoesn’t supports.supports custom query using CreateQuery and Execute methods.
4lazy loadingdoesn’t supports.supports.

Jun 7, 2014

ILIST vs IENUMERABLE

ILIST vs IENUMERABLE
S.NoParticularsILISTIENUMERABLE
1Add/Remove ItemSupport.doesn't support.
2Filteringdoesn't support.Support.