   C# probs
  I was testing the C# workshops when I tried this code they used, I got the odd comment "Unhandled Exception: System.FormatException: Input string was not in a correct format. etc ...This is the code I used, the problem is situated in line 22, thats all I could figure out.Thanks anyway Phillercode:namespace Tester{    class CharacterFightProgram    {   static void Main()   {  Character rand = new Character();  rand.Name = "Rand";  rand.Level = 5;  rand.Hitpoints = 50;  rand.Strength = 5;  rand.Armor = 5;  Character Semirhage = new Character();  Semirhage.Name = "Semirhage";  Semirhage.Level = 4;  Semirhage.Hitpoints = 40;  Semirhage.Strength = 4;  Semirhage.Armor = 4;  rand.Attack(Semirhage);  System.Console.WriteLine( "{o}'s hitpoints are now {1}.", Semirhage.Name, Semirhage.Hitpoints );   }    }    class Character    {   public void Attack(Character enemy)   {  int damage = 0;  damage = Level + Strength;  int resistance = 0;  resistance = enemy.Level + enemy.Armor;  int totalDamage = damage - resistance;  if (totalDamage &lt;= 0) totalDamage = 1;  enemy.Hitpoints -= totalDamage;   }   public int Hitpoints   {  get { return m_Hitpoints; }  set  { if (value &lt; 0) m_Hitpoints = 0; else m_Hitpoints = value;  }   }   public System.String Name;   public int Level;   public int Strength;   public int Armor;   private int m_Hitpoints;    }}
  As the program, says, this line is your problem:System.Console.WriteLine("{o}'s hitpoints are now {1}.", Semirhage.Name, Semirhage.Hitpoints);you wrote {o} (with the letter 'o' as in 'one') but it should be {0} (as in 'zero', the digit).   ;  aha, indeed now it works, thanks alot   