I am using an object initializer to create an object with a Position
property like this:
var control = new HtmlTextbox(browser)
{
Position = position;
};
As I know it's the same as:
var control = new HtmlTextbox(browser);
control.Position = position;
But I want to use initializated Position
property in my constructor method.
Is there any way to do it without providing the Position
as an argument for constructor?