class Program { static void Main(string[] args) { Test test = new Test(); Dictionary<string, string> dic = new Dictionary<string, string>(test); Console.ReadKey(); } }class Test :IDictionary<string,string> { #region IDictionary<string,string> 成员 public void Add(string key, string value) { throw new NotImplementedException(); } public bool ContainsKey(string key) { throw new NotImplementedException(); } public ICollection<string> Keys { get { throw new NotImplementedException(); } } public bool Remove(string key) { throw new NotImplementedException(); } public bool TryGetValue(string key, out string value) { throw new NotImplementedException(); } public ICollection<string> Values { get { throw new NotImplementedException(); } } public string this[string key] { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } #endregion #region ICollection<KeyValuePair<string,string>> 成员 public void Add(KeyValuePair<string, string> item) { throw new NotImplementedException(); } public void Clear() { throw new NotImplementedException(); } public bool Contains(KeyValuePair<string, string> item) { throw new NotImplementedException(); } public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex) { throw new NotImplementedException(); } public int Count { get { throw new NotImplementedException(); } } public bool IsReadOnly { get { throw new NotImplementedException(); } } public bool Remove(KeyValuePair<string, string> item) { throw new NotImplementedException(); } #endregion #region IEnumerable<KeyValuePair<string,string>> 成员 public IEnumerator<KeyValuePair<string, string>> GetEnumerator() { throw new NotImplementedException(); } #endregion #region IEnumerable 成员 IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } #endregion }
class Program
{
static void Main(string[] args)
{
Test test = new Test();
Dictionary<string, string> dic = new Dictionary<string, string>(test); Console.ReadKey();
}
}class Test :IDictionary<string,string>
{ #region IDictionary<string,string> 成员 public void Add(string key, string value)
{
throw new NotImplementedException();
} public bool ContainsKey(string key)
{
throw new NotImplementedException();
} public ICollection<string> Keys
{
get { throw new NotImplementedException(); }
} public bool Remove(string key)
{
throw new NotImplementedException();
} public bool TryGetValue(string key, out string value)
{
throw new NotImplementedException();
} public ICollection<string> Values
{
get { throw new NotImplementedException(); }
} public string this[string key]
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
} #endregion #region ICollection<KeyValuePair<string,string>> 成员 public void Add(KeyValuePair<string, string> item)
{
throw new NotImplementedException();
} public void Clear()
{
throw new NotImplementedException();
} public bool Contains(KeyValuePair<string, string> item)
{
throw new NotImplementedException();
} public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
{
throw new NotImplementedException();
} public int Count
{
get { throw new NotImplementedException(); }
} public bool IsReadOnly
{
get { throw new NotImplementedException(); }
} public bool Remove(KeyValuePair<string, string> item)
{
throw new NotImplementedException();
} #endregion #region IEnumerable<KeyValuePair<string,string>> 成员 public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
throw new NotImplementedException();
} #endregion #region IEnumerable 成员 IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
} #endregion
}