Constructor.ToGenericString Method

Definition

Returns a string describing this Constructor, including type parameters.

[Android.Runtime.Register("toGenericString", "()Ljava/lang/String;", "")]
public override string ToGenericString ();
[<Android.Runtime.Register("toGenericString", "()Ljava/lang/String;", "")>]
override this.ToGenericString : unit -> string

Returns

a string describing this Constructor, include type parameters

Attributes

Remarks

Returns a string describing this Constructor, including type parameters. The string is formatted as the constructor access modifiers, if any, followed by an angle-bracketed comma separated list of the constructor's type parameters, if any, followed by the fully-qualified name of the declaring class, followed by a parenthesized, comma-separated list of the constructor's generic formal parameter types.

If this constructor was declared to take a variable number of arguments, instead of denoting the last parameter as "Type[]", it is denoted as "Type...".

A space is used to separate access modifiers from one another and from the type parameters or return type. If there are no type parameters, the type parameter list is elided; if the type parameter list is present, a space separates the list from the class name. If the constructor is declared to throw exceptions, the parameter list is followed by a space, followed by the word "throws" followed by a comma-separated list of the thrown exception types.

The only possible modifiers for constructors are the access modifiers public, protected or private. Only one of these may appear, or none if the constructor has default (package) access.

Added in 1.5.

Java documentation for java.lang.reflect.Constructor.toGenericString().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to