Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

C# programming


  • Please log in to reply
14 replies to this topic

#1 comet@earth

comet@earth

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 12 February 2011 - 02:28 AM

Hi guys
I am beginning C# sharp programming.I have googled and then followed the commands to run a c sharp program but the "command.com" prompt shows the message "csc is an unrecognized command....".I know it is easier to run the programs using visual c# but please help me to run using notepad.Please Please help.
Thank you

BC AdBot (Login to Remove)

 


#2 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:07:24 AM

Posted 12 February 2011 - 11:12 AM

command.com used to be present in Windows ME and older versions. From Windows XP onwards, now you use cmd.exe.

But you do not have to worry about that, just open Start Menu > Programs > Microsoft Visual Studio > Visual Studio Tools > Visual Studio Command Prompt
[Your shortcut name or path to shortcut may differ a little depending on the version and edition of Visual Studio installed. ]

This would open the command line interface window in which you can give all commands like CSC or CL etc.

#3 comet@earth

comet@earth
  • Topic Starter

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 13 February 2011 - 09:53 AM

I don't have visual studio.I tried running the programs using the .net framework.
Thank You

#4 JosiahK

JosiahK

  • Members
  • 269 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:24 PM

Posted 13 February 2011 - 12:45 PM

Have you considered downloading Visual Studio? The full version is for pay, but you can get the express version for free.
https://www.microsoft.com/express/Downloads/
Quod non mortiferum, fortiorem me facit.
I don't read minds. Please help everyone by answering any questions and reporting on the results of any instructions. Query any concerns and explain problems or complications.

#5 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:24 AM

Posted 13 February 2011 - 01:03 PM

Or if you happen to be in College, you can get it from Dreamspark for free.

#6 comet@earth

comet@earth
  • Topic Starter

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 13 February 2011 - 01:57 PM

I am just trying to follow the format specified in our college.Is there no way that I can run the program using notepad and the .net framework.I saw an article in google and followed it but it didn't work.
Thnk u

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:24 AM

Posted 13 February 2011 - 03:59 PM

Do me a favor. If you expect the rest of us to take our free time to help answer our questions, then at least have the courtesy to avoid using shorthand like 'u' and 'thnk'. I am sort of a cynic, and I figure if you are too lazy to type out the actual words so that I can understand you, then I'll just go help someone else that at least appears to be making an effort. Additionally our foreign members may not understand you, and thus won't be able to help.

Notepad can't run anything. Notepad is a text editor and nothing more. Since we have no idea what format your college has specified, we cannot help. We also have no clue what article you tried to follow. If you want to maybe share some of that information with us, then I am sure someone would be glad to help. Or maybe just ask your teacher.

#8 comet@earth

comet@earth
  • Topic Starter

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 16 February 2011 - 10:00 AM

First of all I am sorry groovicus sir.I think I was lazy.Next is our college follows that format but we haven't started our C# labs so I don't know who the teacher is.I just want to advance my preparation so would you be kind enough to help me out.I am trying to run the program by writing it in a notepad and linking it to the .net framework.The manuals in google do not specify anything specially for linking.All the instructions say that is just type csc program_name.cs in command prompt,change the path to the source directory and you will get the output.But this is not happening in my case.I hope I am clear.
Thank you

Edited by comet@earth, 16 February 2011 - 10:01 AM.


#9 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:24 AM

Posted 16 February 2011 - 12:01 PM

A c# program has to be compiled before it can be ran. It is not like a batch file or something where it can just be ran directly. The compiler will take your code, link it to the proper libraries, and produce code that the computer can then understand.

As JosiahK stated above, download Visual Studio Express and practice writing code. It will handle all of the linking and compiling for you. Chances are that will be using an IDE in class anyway, and since you are learning C#,I would bet that you are going to be using Visual Studio anyway, unless the class you are taking is specifically teaching about linkers and compilers, in which case I would expect them to use a lower level language.

There are tons of tutorials available for C# directly from Microsoft:
http://msdn.microsoft.com/en-us/library/aa288436%28v=vs.71%29.aspx

#10 comet@earth

comet@earth
  • Topic Starter

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 17 February 2011 - 01:52 AM

Yes you are correct about the last part,we will be taught about compilers and linkers and that's the reason why we hardly use visual programming in our college.What do I do now?

#11 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:24 AM

Posted 17 February 2011 - 08:24 AM

Maybe try here?
http://msdn.microsoft.com/en-us/library/ms379563%28v=vs.80%29.aspx

Just being able to write a program that compiles isn't really going to teach you anything about the linker and compiler; it is just going to teach you how to use them. How they work is something that can be learned from a text book.

#12 comet@earth

comet@earth
  • Topic Starter

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Local time:05:54 PM

Posted 17 February 2011 - 06:29 PM

Thank you all for the help.I was able to compile the program using the SDK command prompt.CHEERS

#13 chromebuster

chromebuster

  • Members
  • 899 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:the crazy city of Boston, In the North East reaches of New England
  • Local time:08:24 AM

Posted 10 March 2011 - 11:29 PM

That's interesting what you say about lower level languages. I have thought that any language can go as low as you want it to go. I mention that because I'm trying to be a freelance C# learner too.

The AccessCop Network is just me and my crew. 

Some call me The Queen of Cambridge


#14 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:24 AM

Posted 11 March 2011 - 06:09 PM

Lower level vs upper level has little to do with the capabilities of the language. Higher level languages are more abstract; that is, they tend to hide the nasty details such as garbage collection, memory allocation and de-allocation, etc. Higher level languages are also easier for people to read and understand. The trade off is that higher level languages use libraries to carry out various functions that are hidden from the user, while lower level languages allow one to manipulate the function of the program as necessary.

You are correct (sort of) in that any language can go as low as one wants it to go, however with a higher level language that means handling the nasty details yourself instead of allowing a library to do it for you. For instance, in Java if you want to sort an array, you can simply call a sort function. However it may not be very efficient for your intended use. You may be able to write your own sort function that works more efficiently than the built in function. I used to have a professor who would write all of his own sort functions that would absolutely devastate the speed and efficiency of the built in library functions. In a language like assembly, you would have to implement that on your own.

TLDR: higher level language hides implementation details.

#15 chromebuster

chromebuster

  • Members
  • 899 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:the crazy city of Boston, In the North East reaches of New England
  • Local time:08:24 AM

Posted 26 March 2011 - 02:47 PM

The only problem with that is how in the world to find a book that discusses how to use all classes and references in the .net framework.

The AccessCop Network is just me and my crew. 

Some call me The Queen of Cambridge





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users