Question

I am working on an ASP.NET project where I use VB.NET within Visual Studio 2010. Some of the other developers on the project are using Visual Studio 2008. We all check our code into single SVN repository. I would like to start using Auto-Implemented Properties within VB.NET ...

Property FirstName as String

instead of ...

Private FirstName as String
  Public Property FirstName() As String
  Get
    Return _FirstName
  End Get
  Set(ByVal value As String)
    _FirstName = value
  End Set
End Property

My concern is that this could mess up things for those using VS2008. What would happen if someone using VS2008 needed to modify my class that made use of Auto-Implemented Properties? I am assuming that since everything compiles down to IL code then there would be no issue in binary compatibility. Though a problem would arise when editing source. I am a correct or mistaken on this? Thank you.

Was it helpful?

Solution

They will get a compilation error

Property missing 'End Property'.

Property without a 'ReadOnly' or 'WriteOnly' specifier must provide both a 'Get' and a 'Set'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top