Re: C# question

if you want to develop simple as hell apps with c#, there indeed is a way in which you can do so with notepad and a c# command line compiler called csc, C(S)harp(c)ompiler.
here is where you can find both csc and the vb.net compiler(vbc). Note: I don't know how many things one can do with those programs alone without msbuild and all those VS tools and things, but that far one can get with the cmd.
first, I recommend you set your path to include something like this(it slightly depends on the version of the .net framework installed):
C:\Windows\Microsoft.NET\Framework64\v4.0.30319
then, you can use the csc.exe and vbc.exe programs, after restart, of course.
for example, save the folowing code in a file called test.cs, somewhere you can open a terminal to, preferably somewhere without spaces and somewhere where the path doesn't exceed 255 characters, just to make things safer.
Now, back to the code. Put this in your test.cs file:
using System;
class program
{
public static void main(string[] args)
{
Console.WriteLine("type a number");
int number=int.parse(Console.ReadLine());//note: this approach is unsafe for reasons too long to explain just yet.
Console.WriteLine("you typed: \n"+number.ToString());
}
}
now, execute the folowing command with the current directory set as the location where you saved the test.cs file:
csc.exe test.cs.
and that's it. Congratulations! you wrote your first c# program in notepad and cmd. It's not pretty, I know, but that's what you get without the help of visual studio. Untill you get a new computer, I assume, this'll have to do for now.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Guitarman via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : bgt lover via Audiogames-reflector

Reply via email to