API reference
Class TimeSpanFormatAttribute
- Namespace
- DisCatSharp.Common.Serialization
- Assembly
- DisCatSharp.Common.dll
Defines the format for string-serialized TimeSpan objects.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public sealed class TimeSpanFormatAttribute : SerializationAttribute
- Inheritance
-
TimeSpanFormatAttribute
- Inherited Members
- Extension Methods
Constructors
- TimeSpanFormatAttribute(TimeSpanFormatKind)
Specifies a predefined format to use.
- TimeSpanFormatAttribute(string)
Specifies a custom format to use.
See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-timespan-format-strings for more details.
Fields
- FORMAT_CONSTANT
Gets the constant format.
- FORMAT_ISO_8601
Gets the ISO 8601 format string of @"ddThh\:mm\:ss\.fff".
- FORMAT_LONG
Gets the general long format.
- FORMAT_SHORT
Gets the general short format.
Properties
- Format
Gets the custom datetime format string to use.
- Kind
Gets the predefined datetime format kind.