int number = 5; Console.WriteLine(typeof(int)); // Output: System.Int32 Console.WriteLine(number.GetType()); // Output: System.Int32
public static bool IsString(object obj) { if (obj is string) { return true; } else { return false; } }In this example, we have created a method called `IsString` that takes an object as a parameter. Inside the method, we have used the `is` keyword to determine if the object is of type string. If it is, the method returns true, otherwise it returns false. Overall, the System Type Select package library in C# provides developers with useful tools for determining the type of objects at runtime.