C# automate constructors refactoring -
i got ask if there option in c#, lets got suche code :
class { public a(int b); } class b : { public b(int b) : base(b); } class c : b { public c(int b) : base(b) }
and if want change in class "int b" "car b" need change in every single class, possible refactor somehow automate?
if possible, can use c# generics :
class a<t> { public a(t b) {} } class b<t> : a<t> { public b(t b) : base(b) {} } class c<t> : b<t> { public c(t b) : base(b) { } }
you can use following syntax int (and use same principle car) :
var intvar = new c<int>(10);
otherwise, there no tool change types @ once. if change parameter type car, resharper propose refactor constructor of derived class.
Comments
Post a Comment