Home > Net >  New why the value to null after a class
New why the value to null after a class

Time:10-01

My small white a figure after the login, after to assign values to the User class in figure 2, check the original password will always show the original password mistake, u.P assWord value has been null why ah?

CodePudding user response:

The same question 2 times,
You don't have the new time, the object is empty,
Such as the User u1=new User ();
The User u2=new User ();
U1 and u2 are independent, 2 can give their assignment, each other
Can be your class instead of a static class, you can direct assignment

CodePudding user response:

New will create a new memory, the memory space is of no value, so that you understand

CodePudding user response:

How to come up to than a password ah, should not first login again than

CodePudding user response:

Code 24/25 row , the attribute value ascribed to compare,

CodePudding user response:

Instead of the class, you need to compare object, and now you like templates gave birth to a boss gave him a sugar and then you gave birth to a second and second asked sugar better good
  •  Tags:  
  • C#
  • Related