Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
testing_editor
//Microsoft (R) Visual C# Compiler version 3.4.0-beta4-19562-05 (ff930dec) //Copyright (C) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //variables are declared once and can be changed //Naming of variables //start with letter //followed by number or underscore //Constants are declared once and cannot be changed later const int A_CONST_INT = 100; //integer //ints by default are 32 bit int anInt = 1; const int THE_CONST INT = 2; //-----------------------------------------------------------------------------------------------------// //8 bit versions of an Int //byte //unsigned by default //range is 0 to 255 byte myByte = 120; const MY_CONST_BYTE = 255; //16 bit version of an Int //Short //range is -32,768 to 32,767 //signed by default short myShort = 32000; const short MY_CONST_Short = -32000; //64 bit version of an Int //Long //range-9.2X10^18 to 9.2X10^18 long mylong = 323232432342; const long MY_CONST_LONG = 3241321312313; //-------------------------------------------------------------------------------------------------------// //unsigned version //uint, ulong, ushort //float //ends with f otherwise it will assume its a double //accurate to 7 decimal units float aFLOAT = 2.23f; //double //64 bits decimals //accurate to 15-16 decimal units const double MY_DOUBLE = 12.23424; //char //they hold a value at a time //letter to a symbol char myChar = 'a'; const char MY_CONST_CHAR = '_'; //boolean //bool holds the value of trye or false bool myBool = true; const MY_CONST_BOOL = false; } } }
run
|
edit
|
history
|
help
0
decimal to binary conversion
Html clean - remove image style
ICollection<T>.Add(T) - Performance Test
Get Round of 5 c# Vishal
Collections demo
test
масиви част2
reverse array
Fibonacci of array elements C#
My Wall