+ 2

Can anyone explain for me What is dynamic data type in C#? And How to declare a dynamic data type?

31st Jul 2020, 9:08 AM
Ruqiya
6 ответов
+ 3
Al Muqdaam Al Adawi THANK U SO MUCH 💛 I want ask about what are the ways of passing parameters to a method in C#. If u know
31st Jul 2020, 1:25 PM
Ruqiya
+ 2
THANK U A LOT💛😭 Al Muqdaam Al Adawi
31st Jul 2020, 4:17 PM
Ruqiya
+ 1
I can't use private messages for some reason ... I will do my best to help you but I am not that good on C# ... I mainly work on Python so I can help you with the logic and code structure
31st Jul 2020, 1:17 PM
Al Muqdaam Al Adawi
Al Muqdaam Al Adawi - avatar
0
So you have the casual passing like getValue(x) This is one is allowing the function to use the value of x and nothing getValue(ref x) So this passes the value and the reference of x for example you pass x to getValue and inside that function you use the x value as c or y and use it for calculations then return the value to x like this code : Int x = 1; x = x +1; //x = 2 getValue(out x) So this one is getting the value form the function to x but if you have one out you can use this code: getValue (int a) { a= a+5; return a; } int x = 1; int y=getValue (x); But getValue (out y) works like int x = 1; int y; getValue(x,out y); So it's more efficient to use (out) when you have multiple output from one function
31st Jul 2020, 3:50 PM
Al Muqdaam Al Adawi
Al Muqdaam Al Adawi - avatar
0
Ruqiya My pleasure ... Happy coding time
31st Jul 2020, 4:21 PM
Al Muqdaam Al Adawi
Al Muqdaam Al Adawi - avatar