.net - VB.NET - Implement Interface in LinqToSql -


how go implementing interface linqtosql class in vb.net?

i've created partial , added explicit implementation, visual studio complaining these properties exist in code created linqtosql model. error message properties have multiple definitions identical signatures.

option strict , option explicit on.

code in partial follows:

partial public class youthresidence     implements iaddress      public property street1 string implements iaddress.street1     public property street2 string implements iaddress.street2     public property city string implements iaddress.city     public property state string implements iaddress.state     public property zipcode string implements iaddress.zipcode  end class 

edit: know can wrap model properties different name in partial, i'd prefer avoid if possible.

this problem how vb.net implements interfaces. doesn't support implicit interfaces c# does. have tie specific member interface declaration. annoying partial classes. can hide these though consumers , make sure talk original member

private property zipcode_hidden string implements iaddress.zipcode     public         return zipcode     end     set(value string)         zipcode = value     end set end property 

here declared property private using class doesn't see zipcode_hidden , if cast object iaddress interface, automatically wrap other partial class' member.

there suggestion on roslyn project address this: https://github.com/dotnet/roslyn/issues/3654


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -