Thursday, January 1, 2015

C# check any type null

You can use this to check null

 public static bool CheckNullOrEmpty<T>(T value)  
 {  
    if (typeof(T) == typeof(string))  
     return string.IsNullOrEmpty(value as string);  
    return value == null || value.Equals(default(T));  
 }  

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...