asp.net.ph

String.GetEnumerator Method

System Namespace   String Class


Retrieves an object that can iterate through the individual characters in the given String.

[ VB ]
<Serializable>
Public Function GetEnumerator ( ) As CharEnumerator

[ C# ]
[ Serializable ]
public CharEnumerator GetEnumerator ( );

[ C++ ]
[ Serializable ]
public: CharEnumerator* GetEnumerator ( );

[ JScript ]
public Serializable
function GetEnumerator ( ) : CharEnumerator;

Return Value

A CharEnumerator object.

Remarks

This method is required by programming languages that support the IEnumerator interface to iterate through members of a collection. For example, the Microsoft Visual Basic and C# programming languages' foreach statement invokes this method to return a CharEnumerator object that can provide read-only access to the characters in the given String of String.

See Also

String Members   IEnumerator   IEnumerable   Chars 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