Click here to Skip to main content
15,922,650 members
Home / Discussions / C#
   

C#

 
QuestionInvoking exe file through asp.net Pin
kalyan_241631-Jan-07 23:06
kalyan_241631-Jan-07 23:06 
AnswerRe: Invoking exe file through asp.net Pin
Pete O'Hanlon31-Jan-07 23:11
mvePete O'Hanlon31-Jan-07 23:11 
GeneralRe: Invoking exe file through asp.net Pin
kalyan_241631-Jan-07 23:24
kalyan_241631-Jan-07 23:24 
GeneralRe: Invoking exe file through asp.net Pin
Pete O'Hanlon1-Feb-07 0:22
mvePete O'Hanlon1-Feb-07 0:22 
AnswerRe: Invoking exe file through asp.net Pin
Colin Angus Mackay31-Jan-07 23:11
Colin Angus Mackay31-Jan-07 23:11 
AnswerRe: Invoking exe file through asp.net Pin
led mike1-Feb-07 4:40
led mike1-Feb-07 4:40 
GeneralRe: Invoking exe file through asp.net Pin
kalyan_241631-Jan-07 23:25
kalyan_241631-Jan-07 23:25 
QuestionErrors with book example program Pin
Lurker0031-Jan-07 23:02
Lurker0031-Jan-07 23:02 
Trying to run the following console program from a 'Sam's' Learn C# book and getting a bunch of
errors; can anyone see what might be causing these please? (I'm only a C# rookie myself.)

Error 1 A namespace does not directly contain members such as fields or methods
Error 3 Invalid token '7' in class, struct, or interface member declaration
Error 4 Invalid token '9' in class, struct, or interface member declaration
Error 5 Invalid token '10' in class, struct, or interface member declaration
Error 6 Invalid token '11' in class, struct, or interface member declaration
Error 7 Invalid token '12' in class, struct, or interface member declaration


1: // Circle1.cs - Overloading the area method
2: //--------------------------------------------------------------------
3:
4: using System;
5:
6: public class Circle
7: {
8: public int x;
9: public int y;
10: public double radius;
11: private const float PI = 3.14159F;
12:
13: public double Area() // Uses values from data members
14: {
15: return Area(radius);
16: }
17:
18: public double Area( double rad )
19: {
20: double theArea;
21: theArea = PI * rad * rad;
22: Console.WriteLine(" The area for radius ({0}) is {1}", rad, theArea);
23: return theArea;
24: }
25:
26: public double Area(int x1, int y1, double rad)
27: {
28: return Area(rad);
29: }
30:
31: public double Area( int x1, int y1, int x2, int y2 )
32: {
33: int x_diff;
34: int y_diff;
35: double rad;
36:
37: x_diff = x2 - x1;
38: y_diff = y2 - y1;
39:
40: rad = (double) Math.Sqrt((x_diff * x_diff) + (y_diff * y_diff));
41:
42: return Area(rad);
43: }
44:
45: public Circle()
46: {
47: x = 0;
48: y = 0;
49: radius = 0.0;
50: }
51: }
52:
53: class CircleApp
54: {
55: public static void Main()
56: {
57: Circle myCircle = new Circle();
58:
59: Console.WriteLine("Passing nothing...");
60: myCircle.Area();
61:
62: Console.WriteLine("\nPassing a radius of 3...");
63: myCircle.Area( 3 );
64:
65: Console.WriteLine("\nPassing a center of (2, 4) and a radius of 3...");
66: myCircle.Area( 2, 4, 3 );
67:
68: Console.WriteLine("\nPassing center of (2, 3) and a point of (5, 6)...");
69: myCircle.Area( 2, 3, 4, 5 );
70: }
71: }

AnswerRe: Errors with book example program Pin
Colin Angus Mackay31-Jan-07 23:10
Colin Angus Mackay31-Jan-07 23:10 
GeneralRe: Errors with book example program Pin
Lurker0031-Jan-07 23:19
Lurker0031-Jan-07 23:19 
AnswerRe: Errors with book example program Pin
Stefan Troschuetz31-Jan-07 23:18
Stefan Troschuetz31-Jan-07 23:18 
GeneralRe: Errors with book example program Pin
Lurker0031-Jan-07 23:36
Lurker0031-Jan-07 23:36 
GeneralRe: Errors with book example program Pin
Russell Jones1-Feb-07 0:23
Russell Jones1-Feb-07 0:23 
AnswerRe: Errors with book example program Pin
bobsugar2221-Feb-07 2:14
bobsugar2221-Feb-07 2:14 
GeneralRe: Errors with book example program Pin
Lurker001-Feb-07 17:31
Lurker001-Feb-07 17:31 
Questionhow to assign a null value to an int Pin
quiteSmart31-Jan-07 22:59
quiteSmart31-Jan-07 22:59 
AnswerRe: how to assign a null value to an int Pin
Colin Angus Mackay31-Jan-07 23:06
Colin Angus Mackay31-Jan-07 23:06 
AnswerRe: how to assign a null value to an int Pin
Parwej Ahamad1-Feb-07 1:14
professionalParwej Ahamad1-Feb-07 1:14 
QuestionRemove groupbox borders Pin
Ankit Aneja31-Jan-07 22:45
Ankit Aneja31-Jan-07 22:45 
AnswerRe: Remove groupbox borders Pin
Colin Angus Mackay31-Jan-07 23:04
Colin Angus Mackay31-Jan-07 23:04 
AnswerRe: Remove groupbox borders Pin
krieg381-Feb-07 0:17
krieg381-Feb-07 0:17 
GeneralRe: Remove groupbox borders Pin
bobsugar2221-Feb-07 2:17
bobsugar2221-Feb-07 2:17 
QuestionWireless communication through WI Fi Pin
Member 378391131-Jan-07 22:26
Member 378391131-Jan-07 22:26 
QuestionHibernate connection for Interbase database Pin
Robi-Robo31-Jan-07 22:20
Robi-Robo31-Jan-07 22:20 
QuestionImplementing "Merge replication" in vs.net 2005 Pin
Spaz8031-Jan-07 21:58
Spaz8031-Jan-07 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.