Hi

I'm using Visual Studio 2005 to write C# code. The codes are as below;(which i got fron C# book).But, it says "There were build errors...bla3",. And i didn't get the output. Can anybody here explain me,why this happen?Well i'm beginner in C#.
For all,Thanks :)

using System;
class TypesSample
{
public static void Main()
{
int a = 5;
byte b = 255;
long c = 5000000;
Console.WriteLine(
"a is {0}, ToString returns {1},Type is {2}",
a, a.ToString(), a.GetType());
Console.WriteLine("b is {0},Type is {1}", b, b.GetType());
Console.WriteLine("c is {0}, Type is {1}", c, c.GetType());
double d;
d = Math.Pow(2, 100);
Console.WriteLine("d is {0}, Type is {1}", d, d.GetType());
bool e;
e = true
Console.WriteLine("e is {0}, Type is {1}", e, e.GetType());
}
}

other than the missing semicolon at the end of

e = true

this compiles and runs fine for me

Yeah,thanx a lot. I've found the error immediately after post the thread :)

well thanks for posting that so I didn't waste my time

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.