asp.net.ph

String Constructor ( SByte*, Int32, Int32, Encoding )

System Namespace   String Class


Initializes a new instance of the String class to the value indicated by a specified pointer to an array of 8-bit signed integers, a starting character position within that array, a length, and an Encoding object.

This constructor is not CLS-compliant. For more information about CLS compliance, see What is the Common Language Specification.

[ C# ]
[ Serializable ]
unsafe public String (
   sbyte* value,
   int startIndex,
   int length,
   Encoding enc
);

[ C++ ]
[ Serializable ]
public: String (
   char* value,
   int startIndex,
   int length,
   Encoding* enc
);

[ VB ] This constructor cannot be used in Visual Basic.

[ JScript ] This constructor cannot be used in JScript.

Parameters [ C#, C++ ]

value
A pointer to an array of 8-bit signed integers.
startIndex
The starting position within value.
length
The number of characters within value to use.
enc
An Encoding object that specifies how the array referenced by value is encoded.

Exceptions [ C#, C++ ]


Exception Type Condition
ArgumentOutOfRangeException startIndex or length is less than zero.

Remarks [ C#, C++ ]

If value is a null pointer, an Empty instance is initialized.

See Also

String Members   String Constructor Overload List   SByte   Int32 Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph