Home > Net >  C # call problem method parameters
C # call problem method parameters

Time:03-06

No return value types of the parameters of the method can call? How to call?

CodePudding user response:

May be my Chinese is not so good what call parameters in it? Ref out??

CodePudding user response:

reference 1st floor OrdinaryCoder response:
may be my Chinese is not so good what call parameters in it? Ref out??

Is such as I have a value assigned to a parameter and then to call the parameter
For example in method 1 assigned to and then I want to call this the I in other place

CodePudding user response:

Write a static class, inside of which can be variable, is that what you mean?
 public static class GlobalConfig 
{
Public static int value;
Public static string name;
}



Anywhere you can use the
GlobalConfig. Value=https://bbs.csdn.net/topics/100;
Or
Int x=GlobalConfig. Value;

CodePudding user response:

If it is a reference type within the function changes back to the response to the incoming object if the value type ref tag with a modification can response to the parameters within the function itself,

CodePudding user response:

The
reference rabbit party at large reply: 3/f
write a static class, inside which can be variable, is that what you mean?
 public static class GlobalConfig 
{
Public static int value;
Public static string name;
}



Anywhere you can use the
GlobalConfig. Value=https://bbs.csdn.net/topics/100;
Or
Int x=GlobalConfig. Value;

In something like this, but I also want to execute a statement, computing, methods, such as you like with similar structure
  •  Tags:  
  • C#
  • Related