[Naab] Explenations:

04/07/2010 23:38 pintser#1
trying to understand more of the C#:

can u guys give me some examples for how? why? when?:

Explain me the following:

what are the diffrences of:

Public bool
Public byte
public ushort
public uint
public void
etc
Teach/explain me all the diffrences please :).


So when do i use: Public bool, and when Public byte etc.?
(Just trying 2 undestand C# more..)

Dont flame.. Just give me examples of what defenition comes when?
04/07/2010 23:47 Arcо#2
Well here's a little need to know about definitions.

Bool: If something is defined as a bool, then it is a true or false statement.
Like public bool GWOn = false;
If its true then where ever it is coded GW will be on.

Byte:Anything defined as a byte is an unsigned 8-bit integer that can go from 0-255, like public byte Level = 0;
A character's level is defined as a byte so it can only go up to 255.

Int:Anything defined as an int is a signed 32-bit integer that can range anywhere from -2,147,483,648 to 2,147,483,647.

Long:Anything defined as a Long is a Signed 64-bit integer that can range anywhere from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Sbyte: Anything defined as an sbyte is a Signed 8-bit integer that can range anywhere from -128 to 127.

Short: Anything defined as a short is a Signed 16-bit integer that can range anywhere from
-32,768 to 32,767.

Uint: Anything defined as a uint is a Unsigned 32-bit integer that can range anywhere from 0 to 4,294,967,295.

Ulong: Anything defined as a ulong is a Unsigned 64-bit integer that can range anywhere from 0 to 18,446,744,073,709,551,615.

A public static void is, (and I'm probably not explaining it right but this is how I view it.) an action.
Like say you have this in world.cs:
public static void Hello ()
{
Console.Writeline("Hello World");
}

Everytime you call the method,
World.Hello();
It is going to write Hello World on the console.
04/08/2010 00:17 pintser#3
wow thanks, helpes 100% afc thanks :)..

and what about:

that can range anywhere from
-32,768 to 32,767.

do i think about rates?
04/08/2010 00:35 Arcо#4
Quote:
Originally Posted by pintser View Post
wow thanks, helpes 100% afc thanks :)..

and what about:

that can range anywhere from
-32,768 to 32,767.

do i think about rates?
What do you mean exactly?
04/08/2010 00:35 PeTe Ninja#5
if you want ranges doo something like..

Console.WriteLine(ushort.MaxValue;);
or

Console.WriteLine(ushort.MinValue+ " - " + ushort.MaxValue);
04/08/2010 00:38 pro4never#6
Quote:
Originally Posted by pintser View Post
trying to understand more of the C#:

can u guys give me some examples for how? why? when?:

Explain me the following:

what are the diffrences of:

Public bool
Public byte
public ushort
public uint
public void
etc
Teach/explain me all the diffrences please :).


So when do i use: Public bool, and when Public byte etc.?
(Just trying 2 undestand C# more..)

Dont flame.. Just give me examples of what defenition comes when?
Arco just did a great job but try checking the link in my siggy. I tried to explain some basic programing concepts and related them to conquer. Search through some of the pages cause they are by no means in order.

@ the ranges of the diff types, someone posted a chart in my thread or you can google them

@ rates?... I assume you mean drop rates or something? What I'd do if your source doesn't already have a percent success function coded is write a function to do it... basically you put in a percentage (double value so you can use decimals) and it will return true/false value based on that percentage.... makes coding drop rates and success rates sooo much easier... I guarantee you that whatever source you are using, there is something similar already coded.
04/08/2010 00:54 pintser#7
Quote:
Long:Anything defined as a Long is a Signed 64-bit integer that can range anywhere from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
i mean:
what do we define with those numbers, are this rates ore just decimals..
(ore can be both)

thanks guys, really appreciate youre helpfull posts :)..
04/08/2010 00:57 Korvacs#8
Moved.

Google for this sort of thing in future please, we are not a general help forum.

[Only registered and activated users can see links. Click Here To Register...]
04/08/2010 01:01 DarkMessiah#9
Quote:
Originally Posted by pintser View Post
i mean:
what do we define with those numbers, are this rates ore just decimals..
(ore can be both)

thanks guys, really appreciate youre helpfull posts :)..
commas are place holders in important countries instead of denoting decimal places.
04/18/2010 14:37 folip5#10
#deleted due being drunk.
04/19/2010 05:39 DarkMessiah#11
Quote:
Originally Posted by folip5 View Post
just do this Console.WriteLine(string.MaxValue);//byte sbyte int uint ulong ushort etc...
about the bool it can be true or false
you can see it with this code

bool i = 10, b = 5;
if (i > b)
Console.WriteLine("your statemant is" + i);
Edit: you can also add string.MinValue so best to do would be Console.WriteLine(byte.MaxValue + byte.MinValue);
with this numbers you define lets say int "your variable here" = 1234(you can put 1234.... as many values as the int holds and if its string "you put a text here" = 123(how many letters can the string hold)

hell no you can't. l2bool
04/19/2010 05:43 MasterFletch#12
Quote:
Originally Posted by folip5 View Post
just do this Console.WriteLine(string.MaxValue);//byte sbyte int uint ulong ushort etc...
about the bool it can be true or false
you can see it with this code

bool i = 10, b = 5;
if (i > b)
Console.WriteLine("your statemant is" + i);
Edit: you can also add string.MinValue so best to do would be Console.WriteLine(byte.MaxValue + byte.MinValue);
with this numbers you define lets say int "your variable here" = 1234(you can put 1234.... as many values as the int holds and if its string "you put a text here" = 123(how many letters can the string hold)
Not only did you bump a dead thread, but you bumped it with completely incorrect information. Read the above post by Arco, learn to use the code, and then proceed to facepalm yourself into oblivion.
04/19/2010 20:09 Warlax#13
Quote:
Originally Posted by folip5 View Post
just do this Console.WriteLine(string.MaxValue);//byte sbyte int uint ulong ushort etc...
about the bool it can be true or false
you can see it with this code

bool i = 10, b = 5;
if (i > b)
Console.WriteLine("your statemant is" + i);
Edit: you can also add string.MinValue so best to do would be Console.WriteLine(byte.MaxValue + byte.MinValue);
with this numbers you define lets say int "your variable here" = 1234(you can put 1234.... as many values as the int holds and if its string "you put a text here" = 123(how many letters can the string hold)
massive lol @ this massive fail :facepalm:
04/20/2010 00:50 Arcо#14
Lmao since when can a bool be an integer?
04/20/2010 01:31 DarkMessiah#15
Quote:
Originally Posted by .Arco View Post
Lmao since when can a bool be an integer?
folip aka samtheman created it as an easter egg when he was on the development team of c wayyyyyyyy back in the day, and has snuck it into the compilers for all other languages since then