8 Replies - 205 Views - Last Post: 10 December 2018 - 05:47 AM Rate Topic: -----

#1 astrid22   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 288
  • Joined: 06-June 17

Protected Overridable Property in VS 2008

Posted 09 December 2018 - 06:09 PM

Hi, in VS 2017 I can declare the below in a class:

Protected Overridable Property Create As String
	Protected Overridable ReadOnly Property Read As String
	Protected Overridable Property Update As String
	Protected Overridable Property Delete As String


But in VS 2008 I am getting an error saying that "Statement cannot appear within a property body. End of property assumed."


I don't have VS2017 installed on my personal laptop that's why I am using 2008. Any ideas?

Is This A Good Question/Topic? 0
  • +

Replies To: Protected Overridable Property in VS 2008

#2 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 195
  • View blog
  • Posts: 1,089
  • Joined: 05-December 13

Re: Protected Overridable Property in VS 2008

Posted 09 December 2018 - 06:53 PM

I don't see an end property, which is expected.

End Property

You are also missing your get/set which are required.

This post has been edited by Sheepings: 09 December 2018 - 07:05 PM

Was This Post Helpful? 0
  • +
  • -

#3 astrid22   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 288
  • Joined: 06-June 17

Re: Protected Overridable Property in VS 2008

Posted 09 December 2018 - 08:49 PM

View PostSheepings, on 10 December 2018 - 01:53 AM, said:

I don't see an end property, which is expected.

End Property

You are also missing your get/set which are required.


Hmmm I understand that however in VS 2017 it works like this:

Public Class Objects

#Region "Properties"
	Protected ReadOnly Property ConnectionString As String
		Get
			Return AConn
		End Get
	End Property
	Protected Overridable Property Create As String
	Protected Overridable ReadOnly Property Read As String
	Protected Overridable Property Update As String
	Protected Overridable Property Delete As String
#End Region
End Class



When I tried in VS 2008 it's no longer working
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14761
  • View blog
  • Posts: 59,004
  • Joined: 12-June 08

Re: Protected Overridable Property in VS 2008

Posted 09 December 2018 - 10:14 PM

Which .NET version are each pointed to? Most likely the 2017 has things the 2008 doesn't.
Was This Post Helpful? 0
  • +
  • -

#5 astrid22   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 288
  • Joined: 06-June 17

Re: Protected Overridable Property in VS 2008

Posted 09 December 2018 - 10:59 PM

View Postmodi123_1, on 10 December 2018 - 05:14 AM, said:

Which .NET version are each pointed to? Most likely the 2017 has things the 2008 doesn't.


The one I posted last works for 2017 but produces an error in 2008
Was This Post Helpful? 0
  • +
  • -

#6 maceysoftware   User is offline

  • Foo
  • member icon

Reputation: 367
  • View blog
  • Posts: 1,573
  • Joined: 07-September 13

Re: Protected Overridable Property in VS 2008

Posted 09 December 2018 - 11:36 PM

That syntax wasn't around in for 2008 visual studio, it was added at some point between 2010 and 2015, can't remember for what version.

Also why don't you download visual studio community for your personals pc then you can have 2017?
Was This Post Helpful? 0
  • +
  • -

#7 astrid22   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 288
  • Joined: 06-June 17

Re: Protected Overridable Property in VS 2008

Posted 10 December 2018 - 12:31 AM

View Postmaceysoftware, on 10 December 2018 - 06:36 AM, said:

That syntax wasn't around in for 2008 visual studio, it was added at some point between 2010 and 2015, can't remember for what version.

Also why don't you download visual studio community for your personals pc then you can have 2017?


the 2008 version has crystal reports included unlike 2017 :(
Was This Post Helpful? 0
  • +
  • -

#8 maceysoftware   User is offline

  • Foo
  • member icon

Reputation: 367
  • View blog
  • Posts: 1,573
  • Joined: 07-September 13

Re: Protected Overridable Property in VS 2008

Posted 10 December 2018 - 01:11 AM

In that case, you will have to use the 2008 syntax, there might be a fair few things catch you out depending on your style of programming.
Was This Post Helpful? 0
  • +
  • -

#9 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 195
  • View blog
  • Posts: 1,089
  • Joined: 05-December 13

Re: Protected Overridable Property in VS 2008

Posted 10 December 2018 - 05:47 AM

Install it form Nuget and you'll have CrystalReports.

I think its the essentials you want?

https://www.nuget.or...ls/13.0.20.2399

Or the core Engine (Seems to be from a different author)

https://www.nuget.or...Reports.Engine/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1