How do I make the return type of a method generic?
₹100 INR / hour
In Bearbeitung
Veröffentlicht vor mehr als 8 Jahren
₹100 INR / hour
Is there a way to make this method generic so I can return a string, bool, int, or double? Right now, it's returning a string, but if it's able find "true" or "false" as the configuration value, I'd like to return a bool for example.
public static string ConfigSetting(string settingName)
{
return [login to view URL][settingName];
}