Class.ToGenericString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a string describing this Class
, including
information about modifiers and type parameters.
[Android.Runtime.Register("toGenericString", "()Ljava/lang/String;", "", ApiSince=26)]
public string ToGenericString ();
[<Android.Runtime.Register("toGenericString", "()Ljava/lang/String;", "", ApiSince=26)>]
member this.ToGenericString : unit -> string
Returns
a string describing this Class
, including
information about modifiers and type parameters
- Attributes
Remarks
Returns a string describing this Class
, including information about modifiers and type parameters.
The string is formatted as a list of type modifiers, if any, followed by the kind of type (empty string for primitive types and class
, enum
, interface
, or @
interface
, as appropriate), followed by the type's name, followed by an angle-bracketed comma-separated list of the type's type parameters, if any.
A space is used to separate modifiers from one another and to separate any modifiers from the kind of type. The modifiers occur in canonical order. If there are no type parameters, the type parameter list is elided.
For an array type, the string starts with the type name, followed by an angle-bracketed comma-separated list of the type's type parameters, if any, followed by a sequence of []
characters, one set of brackets per dimension of the array.
Note that since information about the runtime representation of a type is being generated, modifiers not present on the originating source code or illegal on the originating source code may be present.
Added in 1.8.
Java documentation for java.lang.Class.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.