0
What is the difference between the curly braces{} and the normal bracket() in c#
I'm kinda confused about when to use them...I normally interchange them.
2 ответов
+ 5
The parenthesis define an explicit expression and the curly brackets define a regular C# code block. The difference is that the explicit expression submits it's output directly as a part of the HTML mark up and the code block doesn't. This is why when the second approach is used, the Render method should be called in order to render the component's mark up.
https://stackoverflow.com/questions/18227852/using-statement-vs-curly-brackets
0
ok I guess I'm cool now..thank you