Welcome to AspAdvice Sign in | Join | Help

Browse by Tags

All Tags » C#   (RSS)

.NET Predicates

YourGenericListOfInts.RemoveAll( new System. Predicate < int >( delegate ( int val) { return (val == r.Index); })); A predicate is a function that returns true or false and can be used for example to filter your results.. For example your .NET RemoveAll(...)
Posted by salibhai | 1 Comments
Filed under: , ,

.NET Advice now SharpDeveloper

I decided to open up shop at my own domain - SharpDeveloper.NET Check it out! Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it! Sponsor
Posted by salibhai | 0 Comments
Filed under: ,

Using ?? and casting To Set Default Values

Often we have some value that may or may not be null, and we want to give it a default value if its null. An awesome way to do this is to use ?? (only works in C#) and add your default value, and cast the entire thing, for example as follows: string strCustomerName
Posted by salibhai | 0 Comments
Filed under: , , ,