+ 25
Does C# has #define like C++?
Sometimes C# is long and I wanna shorten it using #define
14 odpowiedzi
+ 17
C# has #define but it's not the same as C/C++. In C/C++, we use #define for constants, but in C# this directive is used as a flag.
https://code.sololearn.com/cFO3wKCOtZ1x/?ref=app
+ 10
Unfortunately nope and we seldom use #define in C#.
If you wish to write shorter and cleaner code, you may consider extension methods or delegates. 😉
+ 6
c# has define and is very long but c++ is very easy and short
+ 5
When you are creating C# codes to solve easy problems, I think you should include only necessary "using directives" 😊😊
+ 1
A very one Hello
+ 1
Hello)
+ 1
No, C# does not support preprocessor macros like C. Visual Studio on the other hand has snippets. Visual Studio's snippets are a feature of the IDE and are expanded in the editor rather than replaced in the code on compilation by a preprocessor
0
hello
0
I'm bad speaking to inglish language (
0
but I want learn this language
0
yes
0
Are you national russian ?
0
ок, я тоже из россии
0
???