home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Help a C# novice

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2153
Discussions: 200,936, Posts: 2,379,243, Members: 246,301
Old February 24th, 2005, 01:06 PM   Digg it!   #1 (permalink)
27
Ultimate Member
 
27's Avatar
 
Join Date: Jun 2004
Location: England
Posts: 1,407
Help a C# novice

I'm trying to compile this simple program and I'm getting this error.
What is it?



Quote:
// circle.cs - Using variables and literals
// This program calculates some circle stuff
// -----------------------------------------

using System;

class variables
{
public static void main()
{
//Declare variables

int radius = 4;
const double PI = 3.14159;
double circum, area;

//Do calculations

area = PI * radius * radius;
circum = 2 * PI * radius;

//Print the results

Console.WriteLine("Radius = {0}, PI = {1}", radius, PI);
Console.WriteLine("The area is {0}", area);
Console.WriteLine("The circumfrence is {0}", circum);
}
}


Last edited by 27 : February 25th, 2005 at 05:22 AM.
27 is offline   Reply With Quote
Old February 24th, 2005, 01:13 PM     #2 (permalink)
Best To Avoid Me
 
Martoch's Avatar
 
Join Date: Mar 2002
Location: Under Your Bed
Posts: 8,863
You should copy/paste your code into your post and use the 'code' tags.


That picture is WAY too small to read the code.
Martoch is offline   Reply With Quote
Old February 24th, 2005, 02:34 PM     #3 (permalink)
27
Ultimate Member
 
27's Avatar
 
Join Date: Jun 2004
Location: England
Posts: 1,407
I know. The code is not with me right now.

It's to calculate circumfrence and area of a circle. The first quiz in "Teach yourself C# in 21 days"
27 is offline   Reply With Quote
Old February 24th, 2005, 06:28 PM     #4 (permalink)
Senior Member
 
micfau1091's Avatar
 
Join Date: Aug 2004
Location: ThisLand Was My Land
Posts: 512
Send a message via AIM to micfau1091 Send a message via Yahoo to micfau1091
try compiling it in release....not debug..
i know you can in VB.NET..should be able to do this in C#

btw..
those pictures are WAY too big..should be like 5 kb, not 250...
__________________
Gaming: AMD64 3K+, X1800GTO 256, 120gb7200
Personal/Living Room Gaming: (laptop)AMD64 3K+, 9700pro, 60gb5400
micfau1091 is offline   Reply With Quote
Old February 25th, 2005, 05:23 AM     #5 (permalink)
27
Ultimate Member
 
27's Avatar
 
Join Date: Jun 2004
Location: England
Posts: 1,407
Code's there now.
What's wrong?
27 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing multiple copies of IE JBorland Applications and Operating Systems 7 October 13th, 2004 04:54 PM
[FAD] Welcomes the new top cruncher.... mickwish Distributed Computing 12 June 30th, 2003 09:52 PM
[FaD] Here's johnny! Ok, Rob! vserlnv Distributed Computing 1 June 30th, 2003 08:10 AM
hi im new! kidblount IMO Community 19 August 15th, 2002 04:52 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2903)
windows 7 problem (6)
CPU fan stops spinning randomly (8)
Wireless Televisions. (8)
California Passes Anti-Flat-HDTV Le.. (41)
Obama the Muslim (14)
Is the PSU I received dead? (11)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Print spooler problem (13)
Foreign voltage (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
Recent Discussions
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)
Is the PSU I received dead? (11)
Have you switched yet? (85)
Regular Build (4)
windows 7 problem (6)
Point and Shoot Camera Suggestions. (2)
Modern Warfare 2 freeze (13)
Wireless Televisions. (8)
wireless user (1)
World's largest Monopoly Game using G.. (332)
Ideal cheap graph card for PC-Gaming? (17)
BIOS won't read disk when I try to fl.. (0)
Install XP pro and a Vista laptop ?? (11)
Graphics Card Upgrade Question (1)
favorit (1)
solutions for virtical white lines on.. (1)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)


All times are GMT -4. The time now is 12:17 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28