The only type of parameterized property you can create in C # is the indexer property:
public class MyConnectionStrings { private string GetConnectionString(string connectionName) { ... } public string this[string connectionName] { get { return GetConnectionString(connectionName); } } }
Otherwise, just create a method - it looks like what you are looking for.
source share