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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Idiotic Notepad/C#/Command Prompt Questions

Idiotic Notepad/C#/Command Prompt Questions

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • . Offline
    . Offline
    ...---...
    wrote on last edited by
    #1

    Hi, I want to write "Hello World" using Notepad and then create the HelloWorld.exe using the >csc HelloWorld.cs (from the command prompt). "Inside C# -- Chapter 1". 1. How should I save the file with Notepad? *.txt? *.cs? "all files"? 2. I'm almost certain that I have set the environment variables for the Framework SDK correctly. 3. I have installed on my machine VS.NET 2003. 4. The file is located on the desktop. I can use the command prompt to open any file on the desktop. HelloWorld.txt will open. HelloWorld.cs will not open (although it will create a file as a ".cs" icon) and any "csc" command will not be recognized. Any help would be greatly appreciated. Go easy on me -- I'm just trying to learn the basics -- thanks

    M 1 Reply Last reply
    0
    • . ...---...

      Hi, I want to write "Hello World" using Notepad and then create the HelloWorld.exe using the >csc HelloWorld.cs (from the command prompt). "Inside C# -- Chapter 1". 1. How should I save the file with Notepad? *.txt? *.cs? "all files"? 2. I'm almost certain that I have set the environment variables for the Framework SDK correctly. 3. I have installed on my machine VS.NET 2003. 4. The file is located on the desktop. I can use the command prompt to open any file on the desktop. HelloWorld.txt will open. HelloWorld.cs will not open (although it will create a file as a ".cs" icon) and any "csc" command will not be recognized. Any help would be greatly appreciated. Go easy on me -- I'm just trying to learn the basics -- thanks

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      Hi! 1. It doesn't matter. You just have to look at the filename your source file gets - when you save it with "*.txt" as filter, Notepad automatically adds ".txt" to the filename. So if you save your source file as "HelloWorld.cs", you'll end up with a file "HelloWorld.cs.txt". But for compiling the final filename really doesn't matter. 2. If you did, "csc.exe" will be found. If you didn't, it won't be found. Simple as that. 3. Then you'll have a VS.NET 2003 command prompt in your start menu. Use this to get the console window, then the correct paths will be set. 4. Putting source files on the desktop usually isn't such a good idea. Create yourself a dedicated source directory (C:\Sources, for example). This is far easier to reach, especially if you're using a command prompt. Regards, mav -- Black holes are the places where god divided by 0...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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