Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Lurker00

@Lurker00
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Is OOP used much in scientific applications?
    L Lurker00

    Could anyone tell me if OOP is used much in scientific applications please? I've gotten the impression from some sources that OOP is mainly used in large office and financial app's...

    C# question

  • Errors with book example program
    L Lurker00

    Not sure if fiddling about with text to columns would be quicker than a manual delete - I'm thinking the most efficient way to fix this and similar problems might be with an Excel VBA macro?

    C# csharp help tutorial question learning

  • Errors with book example program
    L Lurker00

    Thanks Stefan! :) (Just noticed all the examples on cd for Day 8 of Sam's C# in 21 Days have the same problem.) On another note, is there a quick and easy way to remove a column of characters, for future reference? (And to fix the rest of the programs quickly.)

    C# csharp help tutorial question learning

  • Errors with book example program
    L Lurker00

    Is there an easy way to do that? (It comes out as a big mess if I copy/paste.) The first error is Line 1, Col 2 for some weird reason. I've actually gotten 18 errors.

    C# csharp help tutorial question learning

  • Errors with book example program
    L Lurker00

    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,

    C# csharp help tutorial question learning

  • Console window question [modified]
    L Lurker00

    "If your console app has no ReadLine at the end, and you run it under the IDE, you'll get "Press any key to continue" prompt. [edit]At least in VS2003[/edit]" This must be why my books don't include the readline statement - I'm using the latest version and without the readline the console window behaves the same as in C when you omit the getchar() statement - it briefly flashes and disappears. Presumably they had their reasons for making the change...

    C# question csharp adobe career learning

  • Console window question [modified]
    L Lurker00

    So the fault is the books I'm using then? It just seemed strange to me that two books could have missed the apparent need for such a statement. (I used to use Getchar() in C, but it's not in C#.)

    C# question csharp adobe career learning

  • Console window question [modified]
    L Lurker00

    No this is supposed to run under the MS Visual C# IDE. I have two "step-by-step" type books and both expect the programs to run using the IDE environement; neither seem to consider this problem...

    C# question csharp adobe career learning

  • Console window question [modified]
    L Lurker00

    I'm new to using the Visual C# 2005 Express - is the console window supposed to just flash up and disappear when displaying output from a console program? The book examples I'm using seem to assume so. I've found a code snippet: System.Console.ReadLine(); which does the job, but is it usually necessary to include this line or something similiar to keep the output window from disappearing please? -- modified at 22:31 Saturday 18th November, 2006

    C# question csharp adobe career learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups