S
shapper
Hello,
I have the following class:
public class Google : ConfigurationElement, IKeyProvider {
[ConfigurationProperty("Key", IsRequired = true)]
public string Key {
get { return this["Key"] as string; }
} // Key
[ConfigurationProperty("Type", IsRequired = true)]
public string Type {
get { return this["Type"] as string; }
} // Type
} // Google
I have many classes similar to this where the common factor is the Key
so I created:
interface IKeyProvider {
string Key { get; set; }
} // IKeyProvider
However, on my Google class I get an error:
'MyApp.Configuration.Google' does not implement interface member
'MyApp.Configuration.IKeyProvider.Key.set'
How can I fix this?
Thanks,
Miguel
I have the following class:
public class Google : ConfigurationElement, IKeyProvider {
[ConfigurationProperty("Key", IsRequired = true)]
public string Key {
get { return this["Key"] as string; }
} // Key
[ConfigurationProperty("Type", IsRequired = true)]
public string Type {
get { return this["Type"] as string; }
} // Type
I have many classes similar to this where the common factor is the Key
so I created:
interface IKeyProvider {
string Key { get; set; }
} // IKeyProvider
However, on my Google class I get an error:
'MyApp.Configuration.Google' does not implement interface member
'MyApp.Configuration.IKeyProvider.Key.set'
How can I fix this?
Thanks,
Miguel