Monday, February 7, 2011

Impetigo Or Herpes On Nose

C # a method linq interesting ToObservableCollection ()

Hello,

back after a long wait to publish a post in C # ... who has not ever had to write an extension method ... Today I propose an interesting extension method for linq:

   namespace System.Linq {

public static class ExtensionMethod
{
public static ObservableCollection ToObservableCollection ( this IEnumerable e)
{
if (e != null )
{
return new ObservableCollection (e);
}
else
{
return null ;
}
}
     } 
    
 } 
 



a beautiful straight to solve different problems ... to the next!

0 comments:

Post a Comment