Please enable JavaScript.
Coggle requires JavaScript to display documents.
BASICS_1 - Coggle Diagram
BASICS_1
CLASSES
Strings
string.Format(str, val)
.Join(",", list)
Immutable
Verbatim
@".."
Arrays
new int[3] {1,2}
Are-Obj
Static
Inaccesible
From-Obj
Init
new CName() { val=1 };
Allocate
Required
new CName()
On-Heap
Removed
By-GarbageColl
Out-Scoped
Later
Copy
MemAddress
PRIMITIVE
Variables
Integral
Byte,Short
Int,Long
Real
Char
Bool
int someVar
Constants
const float
SomeVar = 3.14f
Overflowing
Avoid
checked {..change val..}
ThrowsException
Type-Convert
Implicit
Byte->Int
Int->Float
Explicit
Int->Byte
byte b = (byte) intVar
Non-compatible
Convert
.ToInt32(..)
.ToByte(..)
.ToInt16(..)
.ToInt64(..)
int.Parse(..)
Comments
//
/* */
STRUCTS
Has
Similar
Classes
Variables
Methods
All-Primitive
Allocate
On-Stack
Automatic
Removed
Immediately
Out-Scoped
Copy
Diff-Memory
For-Value
FIRST-APP
Create
NewProject > Windows
ConsoleApp
GiveName
Program.cs
Namespace
AppName
Class
Program
StaticMethod
Main
SolutionExplorer
AssemblyInfo.cs
Identification
Produced
Assembly
In-Properties
References
Folder
Containing
Assemblies
Used
Different
App.config
Config-XML
Program.cs
Write-Code
Default-Imports
System
Basic-Utility
Primitive-Types
.Collections.Generic
List
Collection
.Linq
Data
.Text
Text
Coding
.Threading.Tasks
Multithreading
ConsoleClass
Console.WriteLine(...)
Data
Read/Write
"txt {0}"
[var1]
ENUMS
Declare
public enum
EName[ : byte] {...}
Attr1 = val1
Attr2 = val2
Casting
(EName)var
Parsing
typeof(EName)
strVar
(EName)Enum.Parse(...)
Convert
enumVar.ToString()
INTRODUCTION
C# vs .NET
C#
Programming
Language
.NET
Framework
Building
WinApps
Supports
C#,F#,VB.NET
Has
CLR
ClassLibrary
CLR
Common
Language
Runtime
C#
To-ILCode
Compiled
Converts
ILCode
To-NativeCode
Like-JRE
NET-Arch
Consist
App
Classes
Class
State
Behaviour
Namespaces
Related
Classes
Assembly
DLL/EXE
Related
Namespaces
Compilation
Many
Assembly-Files
Built