本文整理汇总了C#中System.Diagnostics.DebuggerTypeProxyAttribute类的典型用法代码示例。如果您正苦于以下问题:C# DebuggerTypeProxyAttribute类的具体用法?C# DebuggerTypeProxyAttribute怎么用?C# DebuggerTypeProxyAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebuggerTypeProxyAttribute类属于System.Diagnostics命名空间,在下文中一共展示了DebuggerTypeProxyAttribute类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HashtableDebugView
[DebuggerTypeProxy(typeof(HashtableDebugView))]
class MyHashtable : Hashtable
{
private const string TestString = "This should not appear in the debug window.";
internal class HashtableDebugView
{
private Hashtable hashtable;
public const string TestString = "This should appear in the debug window.";
public HashtableDebugView(Hashtable hashtable)
{
this.hashtable = hashtable;
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public KeyValuePairs[] Keys
{
get
{
KeyValuePairs[] keys = new KeyValuePairs[hashtable.Count];
int i = 0;
foreach(object key in hashtable.Keys)
{
keys[i] = new KeyValuePairs(hashtable, key, hashtable[key]);
i++;
}
return keys;
}
}
}
}