Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 16:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Naab] Explenations:

Discussion on [Naab] Explenations: within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
[Naab] Explenations:

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?
pintser is offline  
Old 04/07/2010, 23:47   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
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.
Arcо is offline  
Thanks
2 Users
Old 04/08/2010, 00:17   #3
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
wow thanks, helpes 100% afc thanks ..

and what about:

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

do i think about rates?
pintser is offline  
Old 04/08/2010, 00:35   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
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?
Arcо is offline  
Old 04/08/2010, 00:35   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
if you want ranges doo something like..

Console.WriteLine(ushort.MaxValue;
or

Console.WriteLine(ushort.MinValue+ " - " + ushort.MaxValue);
PeTe Ninja is offline  
Old 04/08/2010, 00:38   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
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.
pro4never is offline  
Thanks
1 User
Old 04/08/2010, 00:54   #7
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
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 ..
pintser is offline  
Old 04/08/2010, 00:57   #8


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Moved.

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

Korvacs is offline  
Old 04/08/2010, 01:01   #9
 
elite*gold: 0
Join Date: Jan 2007
Posts: 177
Received Thanks: 57
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.
DarkMessiah is offline  
Old 04/18/2010, 14:37   #10
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
#deleted due being drunk.
folip5 is offline  
Old 04/19/2010, 05:39   #11
 
elite*gold: 0
Join Date: Jan 2007
Posts: 177
Received Thanks: 57
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
DarkMessiah is offline  
Old 04/19/2010, 05:43   #12
 
elite*gold: 0
Join Date: Apr 2006
Posts: 35
Received Thanks: 9
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.
MasterFletch is offline  
Old 04/19/2010, 20:09   #13
 
elite*gold: 0
Join Date: Apr 2007
Posts: 906
Received Thanks: 1,431
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
Warlax is offline  
Old 04/20/2010, 00:50   #14
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Lmao since when can a bool be an integer?
Arcо is offline  
Old 04/20/2010, 01:31   #15
 
elite*gold: 0
Join Date: Jan 2007
Posts: 177
Received Thanks: 57
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
DarkMessiah is offline  
Thanks
1 User
Reply

Tags
c#, understand, wow, wow.schurke




All times are GMT +1. The time now is 16:51.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.