Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFTime.ToString Method (String, IFormatProvider)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFTime.ToString Method (String, IFormatProvider)
Returns a String that represents the current object.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public string ToString(
	string format,
	IFormatProvider provider = null
)
Public Function ToString ( 
	format As String,
	Optional provider As IFormatProvider = Nothing
) As String

Dim instance As AFTime
Dim format As String
Dim provider As IFormatProvider
Dim returnValue As String

returnValue = instance.ToString(format, 
	provider)
public:
virtual String^ ToString(
	String^ format, 
	IFormatProvider^ provider = nullptr
) sealed
abstract ToString : 
        format : string * 
        ?provider : IFormatProvider 
(* Defaults:
        let _provider = defaultArg provider null
*)
-> string 
override ToString : 
        format : string * 
        ?provider : IFormatProvider 
(* Defaults:
        let _provider = defaultArg provider null
*)
-> string 

Parameters

format
Type: SystemString
A format string which should contain either a format specifier character or a custom format pattern. For more information, see the summary page for DateTimeFormatInfo in MSDN help. If this parameter is or an empty string, then the general format specifier 'G' is used.
provider (Optional)
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information. If , then the DateTimeFormatInfo associated with the current culture is used.

Return Value

Type: String
Returns a String that represents the current object.

Implements

IFormattableToString(String, IFormatProvider)

Remarks

This is an override of the Object.ToString method which returns a human-readable string for the object. If the object has a Name property, then the value of that property is normally returned. For collections, the AFIdentity is normally returned.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in