Override Default Constructor of Partial Class with Another Partial Class

前端 未结 12 1866
时光取名叫无心
时光取名叫无心 2020-12-28 12:59

I don\'t think this is possible, but if is then I need it :)

I have a auto-generated proxy file from the wsdl.exe command line tool by Visual Studio 2008.

Th

12条回答
  •  灰色年华
    2020-12-28 13:41

    I am thinking you might be able to do this with PostSharp, and it looks like someone has done just what you want for methods in generated partial classes. I don't know if this will readily translate to the ability to write a method and have its body replace the constructor as I haven't given it a shot yet but it seems worth a shot.

    Edit: this is along the same lines and also looks interesting.

提交回复
热议问题