Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ToCharArray()

int System.Xml.UniqueId.ToCharArray ( char[] chars,
int offset )
inline

Definition at line 239 of file UniqueId.cs.

240 {
242 if (chars == null)
243 {
244 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
245 }
246 if (offset < 0)
247 {
248 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
249 }
250 if (offset > chars.Length)
251 {
252 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, chars.Length)));
253 }
254 if (charArrayLength > chars.Length - offset)
255 {
257 }
259 return charArrayLength;
260 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ValueMustBeNonNegative
Definition SR.cs:296
static string XmlArrayTooSmallOutput
Definition SR.cs:328
static string OffsetExceedsBufferSize
Definition SR.cs:322
Definition SR.cs:7
unsafe void ToSpan(Span< char > chars)
Definition UniqueId.cs:262

References System.Xml.UniqueId.CharArrayLength, System.chars, System.Xml.Dictionary, System.SR.Format(), System.offset, System.SR.OffsetExceedsBufferSize, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Xml.UniqueId.ToSpan(), System.SR.ValueMustBeNonNegative, and System.SR.XmlArrayTooSmallOutput.