TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
asawari.teredesai
NA
4
0
error 1 - Invalid expression term "(CS1525) and error 2 - ; expected(CS1002)
Sep 3 2004 10:07 AM
Hi I'm getting above 2 errors while compiling a simple C# code. Can anyone help me? Thanks.... ------------------------------------------------------------------------ // created on 9/3/2004 at 6:45 PM using System; class Point { public double x, y; public Point() { this.x = 0; this.y = 0; } public Point(double x, double y) { this.x = x; this.y = y; } public static double Distance(Point a, Point b) { double xdiff = a.x – b.x; double ydiff = a.y – b.y; return Math.Sqrt(xdiff * xdiff + ydiff * ydiff); } public override string ToString() { return string.Format("({0}, {1})", x, y); } } class Test { static void Main() { Point a = new Point(); Point b = new Point(3, 4); double d = Point.Distance(a, b); Console.WriteLine("Distance from {0} to {1} is {2}", a, b, d); } } -------------------------------------------------------------------------------------
Reply
Answers (
2
)
Can I refer to a bool or int?
MouseHover event