Even if the request is a kind of strange, this should be the solution (even if it is conceptually wrong):
public class Config
{
private string param;
public bool MyBool
{
get { return bool.Parse(param); }
}
public int MyInt
{
get { return int.Parse(param); }
}
public string My
{
get { return param; }
}
}
Then use it simply as:
Config c = new Config();
int i = c.MyInt;
Cheers