Interface IParser
- Namespace
- Cuemon.Text
- Assembly
- Cuemon.Core.dll
public interface IParser
Methods
Parse(String, Type)
Converts the specified input
to an object of targetType
.
object Parse(string input, Type targetType)
Parameters
Returns
- Object
An object of
targetType
equivalent toinput
.
Parse<T>(String)
Converts the specified input
to an object of T
.
T Parse<T>(string input)
Parameters
input
StringThe string to convert.
Returns
- T
An object of
T
equivalent toinput
.
Type Parameters
T
The type of the object to return.
TryParse(String, Type, out Object)
Converts the specified input
to an object of targetType
. A return value indicates whether the conversion succeeded.
bool TryParse(string input, Type targetType, out object result)
Parameters
input
StringThe string to convert.
targetType
TypeThe type of the object to return.
result
ObjectWhen this method returns, contains the object of
targetType
equivalent toinput
, if the conversion succeeded, ordefault
if the conversion failed.
Returns
- Boolean
true
ifinput
was converted successfully; otherwise,false
.
TryParse<T>(String, out T)
Converts the specified input
to an object of T
. A return value indicates whether the conversion succeeded.
bool TryParse<T>(string input, out T result)
Parameters
input
StringThe string to convert.
result
TWhen this method returns, contains the object of
T
equivalent toinput
, if the conversion succeeded, ordefault
if the conversion failed.
Returns
- Boolean
true
ifinput
was converted successfully; otherwise,false
.
Type Parameters
T
The type of the object to return.