List
_As;
_As=_DbCnn. Query (SQL). ToList ();//this is a collection of database query out
Object A has A constructor
The public (A)
{
_B=new B ();
}
Excuse me _As=_DbCnn. Query (SQL). ToList (); This assignment, the object A constructor executes? CodePudding user response:
You're not yourself next breakpoint?? CodePudding user response:
Does not perform, not instantiate objects, such assignment is an error, not the instance reference to the object, CodePudding user response:
In principle, if a class can be instantiated smoothly. There must be a constructor to perform, either a parameterless constructor, either has a constructor parameters,
CodePudding user response: