次の方法で共有


Record.ToString Method

Definition

Returns a string representation of the record.

[Android.Runtime.Register("toString", "()Ljava/lang/String;", "GetToStringHandler", ApiSince=34)]
public abstract string ToString ();
[<Android.Runtime.Register("toString", "()Ljava/lang/String;", "GetToStringHandler", ApiSince=34)>]
override this.ToString : unit -> string

Returns

a string representation of the object.

Attributes

Remarks

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are Record#equals(Object) equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Java documentation for java.lang.Record.toString().

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