_hristo_

_hristo_

  • NA
  • 1
  • 0

denotes a 'class' which is not valid in the given context???

Mar 11 2005 7:46 AM
Hi! First post from a newbie! :-) So what is wrong? What does it really mean? denotes a 'class' which is not valid in the given context Posts my code below (in some in swedish): ****************************************** using System; namespace Upp1 { /// /// Summary description for Class1. /// public class Class1 { public Class1() { Upp1.Procentcalc(); } } } ************************************************ using System; namespace Upp1 { /// /// Summary description for Class1. /// public class Procentcalc { string Belopp=""; string Procent=""; double dBelopp=0; double dProcent=0; double Resultat=0; [STAThread] private void Main() { System.Console.WriteLine("Mata in ett belopp"); Belopp =System.Console.ReadLine(); System.Console.WriteLine("Mata in procentsatsen"); Procent =System.Console.ReadLine(); dBelopp=Convert.ToDouble(Belopp); dProcent=Convert.ToDouble(Procent); Resultat=(dBelopp/100)*dProcent; Console.Write(Procent + " procent av " +Belopp + " är " +Resultat); } } } ********************************************************* Does it make any sense?

Answers (2)