Complete the code to assign the default value of type T to the variable.
T value = [1];The default keyword returns the default value of the generic type T.
Complete the method to return the default value of generic type T.
public T GetDefaultValue<T>() {
return [1];
}The method returns default(T) which is the default value for type T.
Fix the error in the code to correctly assign the default value of T.
T result = [1](T);The correct syntax to get the default value is default(T).
Fill both blanks to create a method that returns the default value of T using expression-bodied syntax.
public T GetDefault<T>() => [1]([2]);
The expression-bodied method returns default(T), the default value of type T.
Fill all three blanks to create a generic method that returns the default value of T and prints its type.
public T GetAndPrintDefault<T>() {
T value = [1]([2]);
Console.WriteLine(typeof([3]));
return value;
}The method assigns default(T) to value, prints the type T, and returns the value.