Complete the code to get the type of the object.
Type type = obj.[1]();The GetType() method returns the runtime type of the current instance.
Complete the code to get all public methods of a type.
MethodInfo[] methods = type.[1]();The GetMethods() method returns an array of MethodInfo objects representing all the public methods of the type.
Fix the error in the code to get the name of the first property.
string propName = type.GetProperties()[[1]].Name;Array indexes start at 0, so to get the first property, use index 0.
Fill both blanks to get all public properties and filter those with a specific type.
PropertyInfo[] props = type.[1](); var stringProps = props.Where(p => p.PropertyType == typeof([2]));
GetProperties() gets all properties, and filtering by typeof(string) selects properties of type string.
Fill all three blanks to get method names that have no parameters.
MethodInfo[] methods = type.[1](); var noParamMethods = methods.Where(m => m.GetParameters().[2] == [3]);
GetMethods() gets all methods, GetParameters() returns parameters, and Length == 0 filters methods with no parameters.