Home > Net >  Beginner novice met strange things, clearly and not to use this method attributes, is what circumsta
Beginner novice met strange things, clearly and not to use this method attributes, is what circumsta

Time:04-30

Is shown in the following figure, actionParameters [0] debugging shows there are N properties, including the Name and BindingInfo no problem, another ParameterInfo I want this, because it has the value of the parameter is exactly what I want to get, but wasn't in tip, don't know is what reason, please master advice, thank you very much!




By the way, I am using net5, before providing online
String para_vaule=filterContext. ActionParameters [p.P arameterName]. ToString ();

In the inside ActionParameters in.net core5.0 cannot use

CodePudding user response:

Point to the left of the bulb you knew

CodePudding user response:

reference 1/f, ancient farming response:
bulb on the left side of the point you know
yellow light bulb no warning, nothing

CodePudding user response:

What type of access is F12. Take a look at this

CodePudding user response:

Please put the cursor in ParameterInfo, reading the newspaper what wrong,

CodePudding user response:

reference 4 floor Dear200892 response:
please put the cursor in the ParameterInfo, what error reading the newspaper,


With a yellow light bulb, two, one: fixed format,
Two: prohibited or configuration issues

CodePudding user response:

Didn't get properties

CodePudding user response:

Code to run when a member function may be a concrete class, and when you write code may use is the base class or interface,
For chestnuts, write code, you quoted is a variable animals, animal is breathing and other members; And running time, in fact, this variable is pointing to a bird (inherited from animals), birds have respiratory function not only, still can fly, but writing code, using animals fly this feature are invisible to the class,
That how to do?
It can be
If (animals A bird is A bird)
{
The bird A.F ly ();
} the else
{
//is not a bird, can't call Fly (), please do other processing,
}
In fact, you if this logic relies on the animal, then you should not have to call a member of the birds; Or you should rely on for subclasses bird, rather than the parent class of animals,

CodePudding user response:

One of the polymorphism of object-oriented concepts.

CodePudding user response:

When debugging, but the actual use is less than, it is because this class may be upward conversion by a derived class,

Belong to the phenomenon of polymorphism, you want to use this property to turn back down



CodePudding user response:

Well, I think Microsoft good nerves, parameter names to a Name came out, he QiQi related values, but why I can't be with parameter Name to give him a property, let him with the parameter Name as easy to obtain, is really crazy, I looked through the entire network, found that can't use, only to find a body and querstring
  •  Tags:  
  • C#
  • Related