1
辞書を作成しました。しかし、ビルド時に、それは私にエラーを与える:ディクショナリーセッターの問題を解決する方法
Change 'INotificationMessage.AlertMessageList ' to be read-only by removing the property setter
public interface INotificationMessage
{
/// <summary>
/// Gets or sets the notification message list.
/// </summary>
/// <value>
/// The notification message list.
/// </value>
Dictionary<string, string> AlertMessageList { get; set; }
}
ayone喜ばこの問題を解決するために私を助けることができます。
を参照してください。そして、あなたは、リストを取得するためにはimplemationを強制的に設定する必要がある場合、インターフェイスにメソッドを追加するだけです。void SetAlertMessageList(Dictionary dict) Dictionary SetAlertMessageList() –
user1519979
@Raj Hello。参考になった場合は回答を受け入れてください。そうでなければ、何が問題なのかを記述します。事前にありがとう – Marusyk
@MegaTronでは、プロパティを設定するためにメソッドをインターフェイスに追加する方法をお勧めします。 – Raj