2
Answers

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

Photo of _hristo_

_hristo_

20y
7.3k
1
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)

0
Photo of Roei Bar
NA 7.8k 0 15y
i think that the problem is in  TcpListener:

try declaring it like this

TcpListener(IPAddress.Any, 3000);
Accepted
Next Recommended Forum