WEB开发网
开发学院WEB开发ASP.NET Visual Studio自定义调试窗体两个小技巧 阅读

Visual Studio自定义调试窗体两个小技巧

 2010-10-09 08:16:07 来源:WEB开发网   
核心提示: 下面我将通过一个例子叙述如何使用DebuggerBrowsable 和DebuggerBrowsableState,开始之前,Visual Studio自定义调试窗体两个小技巧(2),看下面这段代码:01classProgram02{03staticvoidMain(string[]args)0

下面我将通过一个例子叙述如何使用DebuggerBrowsable 和DebuggerBrowsableState。开始之前,看下面这段代码:

01 class Program 
02 { 
03   static void Main(string[] args) 
04   { 
05     List student = new List(); 
06     student.Add(new Student { Roll = 1, Name = "Abhijit", Marks = 87, Addresses = new Address { Address1 = "add1", Address2 = "add2" } }); 
07     student.Add(new Student { Roll = 2, Name = "Abhishek", Marks = 41, Addresses = new Address { Address1 = "add3", Address2 = "add4" } }); 
08     student.Add(new Student { Roll = 3, Name = "Rahul", Marks = 67, Addresses = new Address { Address1 = "add5", Address2 = "" } }); 
09     student.Add(new Student { Roll = 4, Name = "Sunil", Marks = 91, Addresses = new Address { Address1 = "add11", Address2 = "add122" } }); 
10     student.Add(new Student { Roll = 5, Name = "Atul", Marks = 71, Addresses = new Address { Address1 = "add12", Address2 = "add222" } }); 
11     student.Add(new Student { Roll = 6, Name = "Kunal", Marks = 71, Addresses = new Address { Address1 = "add12", Address2 = "add222" } }); 
12   } 
13   ///  
14   /// Student Class 
15   ///  
16  
17   class Student 
18   { 
19     public int Roll { get; set; } 
20     public string Name { get; set; } 
21     public int Marks { get; set; } 
22     public Address Addresses { get; set; } 
23   } 
24  
25   ///  
26   /// Address of Students 
27   ///  
28   class Address 
29   { 
30  
31     public string Address1 { get; set; } 
32  
33     public string Address2 { get; set; } 
34   } 
35  
36 } 

上一页  1 2 3 4  下一页

Tags:Visual Studio 定义

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接