AFTimeSpan.ToString Method (IFormatProvider, Boolean)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
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( IFormatProvider provider, bool toAbbreviatedNames )
Public Function ToString ( provider As IFormatProvider, toAbbreviatedNames As Boolean ) As String Dim instance As AFTimeSpan Dim provider As IFormatProvider Dim toAbbreviatedNames As Boolean Dim returnValue As String returnValue = instance.ToString(provider, toAbbreviatedNames)
public: String^ ToString( IFormatProvider^ provider, bool toAbbreviatedNames )
member ToString : provider : IFormatProvider * toAbbreviatedNames : bool -> string
Parameters
- provider
- Type: SystemIFormatProvider
An object that supplies culture-specific formatting information. If , then the DateTimeFormatInfo associated with the current culture is used. - toAbbreviatedNames
- Type: SystemBoolean
If , then the converted string will normalized using abbreviated time names. If , then the converted string will normalized using normal (long) time names.
Return Value
Type: StringReturns a String that represents the current object.
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.