Interface IParser<TResult>
- Namespace
- Cuemon.Text
- Assembly
- Cuemon.Core.dll
Defines methods that converts a String to a generic object of TResult
.
public interface IParser<TResult>
Type Parameters
TResult
The type of the converted result.
Methods
Parse(String)
Converts the input
to its TResult
equivalent.
TResult Parse(string input)
Parameters
input
StringThe string to convert.
Returns
- TResult
A
TResult
equivalent toinput
.
TryParse(String, out TResult)
Converts the input
to its TResult
equivalent. A return input indicates whether the conversion succeeded.
bool TryParse(string input, out TResult result)
Parameters
input
StringThe string to convert.
result
TResultWhen this method returns, contains the
TResult
equivalent of theinput
, if the conversion succeeded, ordefault
if the conversion failed.
Returns
- Boolean
true
ifinput
was converted successfully; otherwise,false
.