PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​FormattersChar­SpanChar­Span
Open sandboxFocus

CharSpan Constructor

CharSpan(Char[], Int32, Int32)

Initializes a new CharSpan from an array of Char.

Declaration
public CharSpan(char[] array, int start, int length)
Parameters
Type Name Description
Char[] array

An array of Char.

System.Int32 start

The start index of the span in the array.

System.Int32 length

The number of characters in the span.

CharSpan(String, Int32, Int32)

Initializes a new CharSpan from a String and specifies the start and lenght of the substring.

Declaration
public CharSpan(string str, int start, int length)
Parameters
Type Name Description
String str

A string.

System.Int32 start

The index of the first character of the span in str.

System.Int32 length

The number of characters in the span.

CharSpan(String)

Initializes a new CharSpan from a String, and takes the whole string.

Declaration
public CharSpan(string str)
Parameters
Type Name Description
String str

A string.