# C Sharp Triangle Class

Platform:  .NET
Published  Jun 20, 2010
Updated  Jun 20, 2010
Not Yet completely finished... at least in my mind. Feel free to use this code in your own projects. ```using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Geometry { public class triangle { public triangle(double GivenBase, double GivenHeight, double GivenHypotenuse, string GivenType, double GivenAA = 0, double GivenBA = 0, double GivenCA= 0) { Base_Length = GivenBase; Height_Length = GivenHeight; Hypotenuse_Length = GivenHypotenuse; if (GivenType == "right") { if (GivenAA != 0 || GivenBA != 0 || GivenCA != 0) { A_Degrees = GivenAA; B_Degrees = GivenBA; C_Degrees = GivenCA; } else { C_Degrees = 90; B_Radians = Math.Asin(Base_Length / Hypotenuse_Length); A_Radians = Math.Asin(Height_Length / Hypotenuse_Length); B_Degrees = RadianToDegree(B_Radians); A_Degrees = RadianToDegree(A_Radians); } } else { Type = GivenType; A_Degrees = GivenAA; B_Degrees = GivenBA; C_Degrees = GivenCA; } } private double Base_Length, Height_Length, Hypotenuse_Length; private double A_Degrees, B_Degrees, C_Degrees, A_Radians, B_Radians; string Type; private double RadianToDegree(double angle) { return angle * (180.0 / Math.PI); } public void WriteAngles() { Console.WriteLine("Angle A: {0,5}. Angle B: {1,5}. Angle C: {2,5}", A_Degrees.ToString(), B_Degrees.ToString(), C_Degrees.ToString()); } public void WriteLengths() { Console.WriteLine("Base: {0,5}. Height: {1,5}. Hypotenuse: {2,5}.", Base_Length.ToString(), Height_Length.ToString(), Hypotenuse_Length.ToString()); } public void WriteInfo() { WriteAngles(); WriteLengths(); } public double GetAngleA() { return A_Degrees; } public double GetAngleB() { return B_Degrees; } public double GetAngleC() { return C_Degrees; } public double GetBaseLength() { return Base_Length; } public double GetHeightLength() { return Height_Length; } public double GetHypotenuseLength() { return Hypotenuse_Length; } } } ```

newbattery   -  Jan 07, 2011
newbattery   -  Jan 07, 2011
Our digital camera battery online shop here,
<a href="http://www.winbatterycharger.com/kodak-easyshare-v705-digital-camera-battery-imhn.htm">kodak easyshare v705 digital camera battery</a>
<a href="http://www.winbatterycharger.com/fujifilm-finepix-f610-digital-camera-battery-imhn.htm">fujifilm finepix f610 digital camera battery</a>
<a href="http://www.winbatterycharger.com/olympus-fe-160-digital-camera-battery-imhn.htm">olympus fe-160 digital camera battery</a>
is your best choice to find best battery selection at the best prices.
<a href="http://www.winbatterycharger.com/hitachi-dz-bp07pw-camcorder-battery-imhn.htm">hitachi dz-bp07pw camcorder battery</a>
<a href="http://www.winbatterycharger.com/casio-np-100-digital-camera-battery-imhn.htm">casio np-100 digital camera battery</a>
Also we stock many chargers for these batteries. Shopping is easy and secure
<a href="http://www.winbatterycharger.com/dell-inspiron-e1505-laptop-battery-imhn.htm">dell inspiron e1505 laptop battery</a>
<a href="http://www.winbatterycharger.com/hp-pavilion-dv4000-series-laptop-battery-imhn.htm">hp pavilion dv4000 series laptop battery</a>
<a href="http://www.winbatterycharger.com/nikon-en-el2-digital-camera-battery-imhn.htm">nikon en-el2 digital camera battery</a>
xiaole001   -  Dec 28, 2010
Jethro   -  Dec 15, 2010
Season's greetings from spammers all 'round the world. ;>
napa182   -  Dec 15, 2010
spammers hitting a new pathetic low =/
xiaole001   -  Dec 15, 2010
sell digital camera battery charger,It should be me like one
panasonic batteries
Digital camera batteries
laptop battery
battery   -  Dec 15, 2010
<a href="http://www.all-good-batteries.com/">panasonic batteries</a>
battery   -  Dec 15, 2010
so good
digitalcharger   -  Jun 22, 2010
<a href="http://www.batteries-charger.co.uk/">batteries charger</a><br />
<a href="http://www.buy-sony-battery-charger.co.uk/">sony battery charger</a><br />