-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
57 lines (37 loc) · 2.05 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
genel vs ve csharp notları
cd path/to/solution/directory
dotnet run MyProject/MyProject.csproj
Replace path/to/solution/directory with the actual path to your solution directory and MyProject/MyProject.csproj with the path to your project file.
ctrl k s yapınca bloğu bişile sarmana izin verir
ctrl k c toplu yorum yapar
ctrl k u toplu yorum açar
VS kullanırkne ana proje dosyası yerine solution aç
vs kullanırken seni rahtlartır
shift f9 quick watch lets you see values of variables in vs
Aynı solutionda iki prje vermek istiyorsan
proje ekle sonra proje birden proje ikiye ulaşmak için proje bire ters tıkla add project refrence de vbve projeyi ekle ardından using diyerek proje namespacei ekle
namespacler porje özel olmalı
internal proje içi
public herkse acık solution içindeki
private en kapalı
Eğer method üzerine /// atarsanm otomatik açıoklama yazmana izin verir
overloada izin var csharpta en sevdiğim xd
Console app 1
i have used dotnet cli to create a console app
dotnet new console -n MyAppName
now use dotnet command to add new class inside project
dotnet new class -n MyClassName
static methods cant be called from instance
static method is kept on type level and not in object level ( type level means class def in python)
staic methods is useful if you dont need any object level data (ones you get during init)
it is simple and more optimized
keywords for variable iinit
readonly : a variable that cannot be changed after initlization can be created value in method
const : a constant variable that cannot be changed but it needs value to be given during init of variable
this : refers to instance when object is maded from given class
public : you can call this method from diffrent files in same namespace or assembly
private : you cant call from outside
Console App 2
Aynı solutionda iki prje vermek istiyorsan
proje ekle sonra proje birden proje ikiye ulaşmak için proje bire ters tıkla add project refrence de vbve projeyi ekle ardından using diyerek proje namespacei ekle
namespacler porje özel olmalı