Object::ToString Method (C++/CX)

Returns a string that represents the current object.

public:
virtual String^ ToString()

A string that represents the current object. You can override this method to provide a custom string message in your ref class or struct:

public ref class Tree sealed
{
public:
Tree(){}
virtual Platform::String^ ToString()override
{
return "I’m a Tree";
};
};

Minimum supported client: Windows 8

Minimum supported server: Windows Server 2012

Namespace: Platform

Header: vccorlib.h

Show:
© 2014 Microsoft