RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringBase::ToInt Method

Converts a string to an integer, throwing an exception if the string is invalid.

Pascal
function ToInt: Integer;
C++
__fastcall int ToInt() const;

System::AnsiStringBase::ToInt converts the given string to an integer value and returns the integer. If the string doesn't contain a valid value, an EConvertError exception is thrown. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!