aspxtreme

String Constructor ( Char* )

System Namespace   String Class


Initializes a new instance of the String class to the value indicated by a specified pointer to an array of Unicode characters.

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

[ C# ]
[ Serializable ]
unsafe public String (
   char* value
);

[ C++ ]
[ Serializable ]
public: String (
   __wchar_t* value
);

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

[ JScript ] This constructor cannot be used in JScript.

Parameters [ C#, C++ ]

value
A pointer to a null terminated array of Unicode characters.

Remarks [ C#, C++ ]

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

This constructor copies the sequence of Unicode charaters at the specified pointer until a null character ( hexadecimal 0x00 ) is reached.

If the specified array is not null-terminated, the behavior of this constructor is system dependent. For example, such a situation might cause an access violation.

In C#, this constructor is defined only in the context of unmanaged code.

See Also

String Members   String Constructor Overload List   Char



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 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 aspxtreme