Connectivity Software User's Guide and Reference
ToString(String) Method



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug Namespace > SparkplugData Class > ToString Method : ToString(String) Method
A standard or custom format string (see Remarks).

The value of this parameter can be null (Nothing in Visual Basic).

Converts the value of the current object to its equivalent string representation using the specified format.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Overloads Function ToString( _
   ByVal format As String _
) As String
'Usage
 
Dim instance As SparkplugData
Dim format As String
Dim value As String
 
value = instance.ToString(format)
[JetBrains.Annotations.NotNull()]
public string ToString( 
   string format
)
[JetBrains.Annotations.NotNull()]
public:
String^ ToString( 
   String^ format
) 

Parameters

format
A standard or custom format string (see Remarks).

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

A string representation of value of the current object as specified by format.

This method never returns null (Nothing in Visual Basic).

Remarks

The format parameter should contain either a standard format specifier or a custom format pattern that defines the format of the returned string. If format is null or an empty string, the general format specifier, 'G', is used.

This method uses formatting information derived from the current culture.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

 

Sparkplug is a trademark of Eclipse Foundation, Inc. "MQTT" is a trademark of the OASIS Open standards consortium. Other related terms are trademarks of their respective owners. Any use of these terms on this site is for descriptive purposes only and does not imply any sponsorship, endorsement or affiliation.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also