Forum > Coding >

[RELEASE] C# REALLY BEGINNER TUTORIAL FOR IDIOTS

SeizureSalad

i love femboys

Posts: 1012

Threads: 73

Joined: Mar, 2021

Reputation: 37

Posted

hello welcome to c# lesson 1 of this sieries i guess idk lets get started

 

VARIABLES

 

Variables store a value. These values can be ints, strings, doubles, floats, chars, bytes, and more.

 

TO DECLARE A VARIABLE

//these are comments. anything starting with "//" is a comment and will not affect your code. these are used to explain what your code is doing.

//data type - name - value
int stuff = 0;

//in this example, the data type is int which stores whole numbers. The name of the variable is "stuff" and the value is 0. You don't have to assign a value but it's probably a bad idea.

int stuff;
stuff = 0;

//example of not assigning a value

 

There is also the var keyword which automatically assumes the data type. You however can't use var for things such as class scoped variables.

 

 

FUNCTIONS

 

Functions are how you do things in C#. You can declare a function like this.

// To declare functions, start with public/static (I shall get into this at a later time and also is optional) followed by the return type. You can return things such as computed values or whatever through functions.

void myFunction(int arg) 
{
    Console.WriteLine(arg);
}

//Example of returning something
bool isEven(int num) 
{
    return num % 2 == 0;
}

 

This is all you shall require for basic C#. You will have already learned this or have just learned this. This is extremely basic and i shall go into further topics in replies if you want.

  • 0

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

Posts: 314

Threads: 37

Joined: Feb, 2021

Reputation: 8

Replied

Can someone make something like this for C++

It would be REALLY helpful for me as I'm a beginner in it.

  • 0

https://media.discordapp.net/attachments/994643402949926956/1004560140252495960/uqJXQIda.gif

Read me.

Discord: Ad#1085; Don't hesitate to DM me if you need help/anything.

Posts: 327

Threads: 18

Joined: Nov, 2021

Reputation: 41

Replied

Dann you put alot of effort into this, nice job 

  • 0

Posts: 1209

Threads: 68

Joined: May, 2022

Reputation: 17

Replied

@AlexSyndrome

check the c++ section

  • 0

Did I mention I use arch btw?

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )