how to set all attributes of an object a value
Hi,
In Visual Studio 2026, csharp, I want like this :
Persion p =new Persion;
Then auto generate all attributes assignment:
p.name="";
p.age=0;
p.address="";
p.a="";
Thanks.
Please sign in to leave a comment.
Hi,
Thank you for reaching out to JetBrains support.
Persion p = new Persion { };
If you'd like to separate the object creation from its member initialization, you can:
I hope this helps. Please let me know if this solution doesn’t meet your goals.