1336 Generating Documentation in Visual Studio Appendix E 108 public double Circumference() 109 { 110 return Math.PI * Diameter(); 111 } 112 113 /// 114 /// Computes the area of the circle. 115 /// 116 /// 117 /// Uses constant Math.PI 118 /// 119 /// 120 /// 121 /// Returns the area of the circle. 122 /// 123 public double Area() 124 { 125 return Math.PI * Math.Pow( Radius, 2 ); 126 } 127 128 /// 129 /// Converts the Circle to 130 /// string format. 131 /// 132 /// 133 /// Overrides ToString method of base class. 134 /// 135 /// 136 /// 137 /// Returns a string that includes the center of the 138 /// circle and its radius. 139 /// 140 public override string ToString() 141 { 142 return “Center = ” + base.ToString() + 143 “; Radius = ” + Radius; 144 } 145 146 } // end class Circle 147 } Fig. E.2 Fig. E.2Fig. E.FiFi2g. E.2g. E.2Circleclass marked up with XML comments. (Part 4 of 4.) 1 // Fig. E.3: CircleTest.cs 2 // Manipulating a Circle object. 3 4 using System; 5 using System.Windows.Forms; 6 7 namespace CircleTest 8 { Fig. E.3 Fig. E.3Fig. E.FiFi3g. E.3g. E.3CircleTestclass marked up with XML comments. (Part 1 of 3.)
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.
This entry was posted
on Tuesday, October 30th, 2007 at 9:15 pm and is filed under Tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.