Let and Set not supported under aspx

A

AbraAbraCadabra

I have an ASP website that I am converting to aspx. I am getting an error
message telling me that the "let and set commands are no longer supported".
Apparently this is new to aspx. How do I fix these commands under .net?
 
M

Mark Rae

I have an ASP website that I am converting to aspx. I am getting an error
message telling me that the "let and set commands are no longer supported".
Correct.

Apparently this is new to aspx.

Yes indeed - first released in 2002...

How do I fix these commands under .net?

Object variables are assigned just like primitive variables...

DataSet objDS = null;
objDS = ...

No need for Let or Set anymore
 
S

sloan

From:
http://www.vbdotnetheaven.com/Code/Jun2003/2035.asp


'VB.NET: Property
'Author: (e-mail address removed)
Imports System

Class MyClass
Private x As Integer

Public Property X() As Integer
Get
Return x
End Get
Set
x = value
End Set
End Property
End Class '[MyClass]

Class MyClient

Public Shared Sub Main()
Dim mc As New MyClass()
mc.X = 10
Dim xVal As Integer = mc.X
Console.WriteLine(xVal) 'Displays 10
End Sub 'Main
End Class 'MyClient
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top