• SPORTS
    AND
    GAMING
  • Sports & Gaming Moderator: mal3volent
  • Bluelight HOT THREADS
  • Let's Welcome Our NEW MEMBERS!

PC Learning C# language

brickk

Bluelighter
Joined
Jul 29, 2018
Messages
133
Location
Europe
With my future computer I'm planning on learning this language. Can't do much right now because Visual Studio is way too heavy to handle for my cpu/ram.
I am not a total beginner, I started to learn html, php, then autoit, lua and other stuff. Yes they are not really programming languages but I know the basics, for example declaring a variable, recall it, doing operation with it/them, using forms, buttons, inputs, "while", "for", creating a function and so on.
I want to get deeper, I found this page and I learned the very basics of C#


However, I don't like how they everytime say "You see that? Don't mind it, we will talk about it later for now its not important". And I read almost all lessons and I never had an explanation.
Take this for example:

object sender, EventArgs e

These two are know as arguments. One arguments is called sender, and the other is called e. Again, you'll learn more about arguments later, so don't worry about them for now.
No, I do worry, I want to know what I am writing not just copy/pasting. What does that e stand for? And what is EventArgs? And most of all, what in the earth are all those "using xxx;" at the beginning of the code?

using System;
using System.Data;
and so on

Also I opened some projects and they are made by a main "form.cs" and I see there are other pages of codes in the "root" of the project, like for example "page1.cs" "page2.cs" but I don't see a call to them from "form.cs". But they are connected somehow (like a button in form.cs that does an action in page1.cs). I was expeting something like

using page1.cs;
or
include page1.cs;

You know what I mean? I think this is a problem when you shift from one language to another and you don't get the differences, even the easier ones.

So yeah, is there a free guide online that explains literally everything in detail?

Thanks for any help!
 

Cheshire_Kat

Sr. Moderator: Music
Staff member
Joined
Jul 8, 2017
Messages
3,816
Location
Edge City
Start here and see how this fits, it's the Microsoft C# programing guide and is quite an extensive resource for the language and it's use. It's the one I used when I was checking out C#. I come from a MASM / C++ programming background and it allowed me to do everything I needed. It is authored and maintained by a team led by C#'s creator, Anders Hejlsberg.


Microsoft C# Guide

Good luck!
 
Last edited:

thujone

Bluelight Crew
Joined
Aug 31, 2006
Messages
10,689
Location
::1
With my future computer I'm planning on learning this language.
Why C# specifically? If you don't have a definite need for C#, there are more accessible languages that might be a better place to start.

What does that e stand for?
event. The guide you linked does provide a good description but probably didn't explain it right at the start because you need to at least understand what a class is first.

From the first article in the Events subsection:

EventArgs is a class. It's short for event arguments, and tells you which events was raised. The letter "e" sets up a variable to use this class. If you change your line of code to this:

And most of all, what in the earth are all those "using xxx;" at the beginning of the code?

using System;
using System.Data;
and so on
invoking libraries so you can use their functions or methods. usually in a simple "Hello World" program, a system library is used for IO functionality so you can print the text.
 

brickk

Bluelighter
Joined
Jul 29, 2018
Messages
133
Location
Europe
C# because I think it is a really strong, modern and flexible programming language, I always wanted to learn C++ (like 10 years ago) but never really tried for various reasons.
Few years ago I started AutoIT for specific tasks (calculation programs, mass copy/paste/move files, interacting with files -read/write- and "convert" them into othert stuff), and I was (am) very satisfied. Same goes with LUA, I created very cool add-ons for games that helped me understanding various things (just a banal example: how much damage did I take before dying? Who did it, and how?). In this specific case there were already free addons around doing almost the same thing, but I wanted to create my own with only the features I need.

But basically in every site I checked when learning AutoIT/similar there was always someone that did a better job with C#, or saying something like "yes its good but you can do way more with C# if you know how to code it" and stuff like that. So yeah I decided to make the big jump, specially now that I have kinda nothing to do so at least I learn something.

I was thinking about Java/Phyton too, maybe they are easier, specially for the very simple stuff I do, but I am getting confortable with C# to be honest, I just need to remember the commands and the little differences. And buy a new computer because to compile a 20-rows page I waited like 2 minutes :(
 

thujone

Bluelight Crew
Joined
Aug 31, 2006
Messages
10,689
Location
::1
Well said. C# is a good all-round language from what I know of it, a bit more batteries-included than something like C. AutoIt seems more similar to PowerShell than C# though, if you're trying to do task automation stuff then it's worth knowing PowerShell as well because high-level scripting languages can be very productive.

In the Linux ecosystem it's most common to write minimal C/C++ programs just for the performance-critical code and then control them from a shell script, which takes less time to program
 

Alex_1991

Moderator: NSADD
Staff member
Joined
Dec 22, 2015
Messages
1,239
Location
Small Town Ontario, Canada
C# because I think it is a really strong, modern and flexible programming language, I always wanted to learn C++ (like 10 years ago) but never really tried for various reasons.
Few years ago I started AutoIT for specific tasks (calculation programs, mass copy/paste/move files, interacting with files -read/write- and "convert" them into othert stuff), and I was (am) very satisfied. Same goes with LUA, I created very cool add-ons for games that helped me understanding various things (just a banal example: how much damage did I take before dying? Who did it, and how?). In this specific case there were already free addons around doing almost the same thing, but I wanted to create my own with only the features I need.

But basically in every site I checked when learning AutoIT/similar there was always someone that did a better job with C#, or saying something like "yes its good but you can do way more with C# if you know how to code it" and stuff like that. So yeah I decided to make the big jump, specially now that I have kinda nothing to do so at least I learn something.

I was thinking about Java/Phyton too, maybe they are easier, specially for the very simple stuff I do, but I am getting confortable with C# to be honest, I just need to remember the commands and the little differences. And buy a new computer because to compile a 20-rows page I waited like 2 minutes :(
I think C# is more utilized for things like game development though is it not? Somebody correct me if Im wrong, its been awhile.

Java and Python are by far the most popular, in demand, and growing languages there are. Especially Python in fields of machine learning, AI, big data, etc. If you can become proficient in either of those youll have work in all sorts of areas.

Python is kind of the cutting edge, bt good old Javas slogan is "write once, run anywhere". If you have a toaster or microwave or whatever with a digital control, its probably written in Java. Its literally everywhere.

Im more into Java myself but have been out of it for the last while. Java is preferable to me because I like the strongly typed language where everything is laid out in full. Python is pretty abbreviated, so to speak, so I found I didnt grasp the concepts as easily as I did going through Java books.

If youre going to learn C#, Id still suggest learning Java because its marketable and Java is an offshoot of C# anyway, or was it just plain C? Either way itll come naturally as a secons language next to C#.

Learn your HTML/CSS/JS stack too and some wordpress. Lots of freelance work there.

Depends what you want to do I guess. You can do whatever with any turing complete language but some are better others in different lines of work.

You use Linux? If you dont, get it. Id suggest Linux Mint, and learn it inside out. Itll be an asset wherever you go in programming.
 

HeadphonesandLSD

Bluelighter
Joined
Oct 10, 2011
Messages
1,495
Learn C first then it'll be easier to pick up everything that is based on it like C# and C++. Knowing C is far more useful in the long run and you won't be limited to using tools like VS. You can pick up C right now with an old machine running some form of *nix.
 
Top