Is it possible to have two different access modifiers on a property? I
used to be able to do this in VB6 but I cannot find the right syntax for
..NET.
Thanks,
Dan 6 8828
This is gone in .Net, I also miss it.
--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire
****************************************
"solex" <so***@nowhere.com> wrote in message
news:ep**************@TK2MSFTNGP11.phx.gbl... Is it possible to have two different access modifiers on a property? I used to be able to do this in VB6 but I cannot find the right syntax for .NET.
Thanks, Dan
"solex" <so***@nowhere.com> schrieb Is it possible to have two different access modifiers on a property? I used to be able to do this in VB6 but I cannot find the right syntax for .NET.
Unfortunately this is not possible. Use a Public Readonly proeperty Get and
a Friend Sub SetTheProperty.
--
Armin
Hello,
"solex" <so***@nowhere.com> schrieb: Is it possible to have two different access modifiers on a property? I used to be able to do this in VB6 but I cannot find the right syntax for .NET.
That's not possible in VB.NET. You can create procedures ('Get'x and
'Set'x) with different modifiers instead.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET http://www.mvps.org/dotnet
Thanks everyone for your response.
TJoker nice MVP qualifications
"TJoker .NET [MVP]" <no****@nonono.no> wrote in message
news:Oc**************@TK2MSFTNGP11.phx.gbl... This is gone in .Net, I also miss it.
-- TJoker, MCSD.NET MVP: Paint, Notepad, Solitaire
****************************************
"solex" <so***@nowhere.com> wrote in message news:ep**************@TK2MSFTNGP11.phx.gbl... Is it possible to have two different access modifiers on a property? I used to be able to do this in VB6 but I cannot find the right syntax for .NET.
Thanks, Dan
I'm still waiting for the newsgroup microsoft.public.notepad !!!
--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire
****************************************
"solex" <so***@nowhere.com> wrote in message
news:uY**************@TK2MSFTNGP09.phx.gbl... Thanks everyone for your response.
TJoker nice MVP qualifications
"TJoker .NET [MVP]" <no****@nonono.no> wrote in message news:Oc**************@TK2MSFTNGP11.phx.gbl... This is gone in .Net, I also miss it.
-- TJoker, MCSD.NET MVP: Paint, Notepad, Solitaire
****************************************
"solex" <so***@nowhere.com> wrote in message news:ep**************@TK2MSFTNGP11.phx.gbl... Is it possible to have two different access modifiers on a property?
I used to be able to do this in VB6 but I cannot find the right syntax
for .NET.
Thanks, Dan
Just out of curiosity, does anyone know why this isn't allowed in .Net? (I
assume this is a limitation of the CLR, not a language-specific limitation.)
It was such a nice feature in VB6.
Is it a violation of some OO principle -- that the get and set accessors
must have the same scope?
"solex" <so***@nowhere.com> wrote in message
news:ep**************@TK2MSFTNGP11.phx.gbl... Is it possible to have two different access modifiers on a property? I used to be able to do this in VB6 but I cannot find the right syntax for .NET.
Thanks, Dan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MstrControl |
last post by:
Greetings All...
I'm creating a BaseClass that will connect to a database and retrieve
the all the properties values from it.
So far so good. All the inherited classes retrieve it values from...
|
by: Colin Fine |
last post by:
Now that PHP5 has proper scoping for class properties and methods, I've
been looking in vain for friend classes, or wondering if there's another
way to achieve this effect:
class A {
...
|
by: |
last post by:
hello there,
what is the difference between Shared and Protected
Shared? where can I read more about theses kind of
variables (or whatever they are....sorry, don't know the
word in eng.)
...
|
by: Tom |
last post by:
I have written a property, where I want to have the GET be available to
anyone (i.e. Public); however, I want the SET to be available ONLY to the
class or program itself (i.e. Friend).
In VB6...
|
by: Chad |
last post by:
Hey everyone,
Ok, I am very security consious with my application(s). I am currently
working on an application in which I want to create several "global"
variables available ONLY to my...
|
by: Boni |
last post by:
Dear all,
I would like to have an access from one class to the private variables of
other. But I also can't find a right sintax. The word "friend" seems to do
something else, VB compiler still...
|
by: AndyB |
last post by:
I'm using xsd.exe to generate a typed-dataset. Then using typed dataset
tables (datatables containing two columns--a name and a value) to bind to
ASP.NET dropdown list controls (for the dropdown...
|
by: jbeteta |
last post by:
Hello,
I have a problem declaring variables. I need to create an object oRpte
as ReportClass on WebForm1.aspx and be able to use its value on
WebForm2.aspx.
For declaring the property oRpte()...
|
by: Jameson |
last post by:
Hi,
I have a property defined something like:
Public Property Index As Integer
Get
Return m_Index
End Get
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |