Good day to you all!
I have just stumbled into an enormous body of work due to the fact that in X# one cannot have an access / assign with the same name as a member.
Unfortunately, all my classes written in VO use the same name for the member, the access and the assign.
This turns out to be an enormous amount of work which I have already started.
What I am doing is renaming the protected variables to “X_..” and then dealing with all the errors.
Any ideas / recommendations would be really helpful!
As always thank you, keep well and,
Cheers, JK
Class changes - Access / Assigns cannot have the same name as the protected ..
-
- Posts: 49
- Joined: Wed Aug 11, 2021 11:03 am
Class changes - Access / Assigns cannot have the same name as the protected ..
Hi John,
unfortunately this is not a limitation of X# itself, but of the .NET Framework.
There is another limitation: there cannot be a method and a access or assign with the same name.
Wolfgang
P.S. I'm using the underscore alone to distinguish my protect variables - that makes also my code easier to read because I see immediatly if a variable is a local or a protected variable
unfortunately this is not a limitation of X# itself, but of the .NET Framework.
There is another limitation: there cannot be a method and a access or assign with the same name.
Wolfgang
P.S. I'm using the underscore alone to distinguish my protect variables - that makes also my code easier to read because I see immediatly if a variable is a local or a protected variable
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
-
- Posts: 49
- Joined: Wed Aug 11, 2021 11:03 am
Class changes - Access / Assigns cannot have the same name as the protected ..
Hi there!
Ok - I am on exactly the same page...
Just a lot of changes to do - not hard but tedious!
As always, thank you, keep well and,
Cheers, JK
Ok - I am on exactly the same page...
Just a lot of changes to do - not hard but tedious!
As always, thank you, keep well and,
Cheers, JK
Class changes - Access / Assigns cannot have the same name as the protected ..
John
The sporter has an option to rename the variables.
Robert
The sporter has an option to rename the variables.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 49
- Joined: Wed Aug 11, 2021 11:03 am
Class changes - Access / Assigns cannot have the same name as the protected ..
Sporter !!!!
Where would I find such a beast?
Thank you!
Where would I find such a beast?
Thank you!
Class changes - Access / Assigns cannot have the same name as the protected ..
John,
That was a typo.
I meant the VOXporter.
See https://www.xsharp.eu/help/example-1-th ... examp.html
Enable the checkbox "CheckForIVarAndPropertyConflicts"
Robert
That was a typo.
I meant the VOXporter.
See https://www.xsharp.eu/help/example-1-th ... examp.html
Enable the checkbox "CheckForIVarAndPropertyConflicts"
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Class changes - Access / Assigns cannot have the same name as the protected ..
Robert,
Arghh, I had completely forgotten I had implemented this in the VOXporter (after you had had suggested to do so)! I think the latest threads in the last days have given enough ideas for a "VO to X#" part 3 session...
Arghh, I had completely forgotten I had implemented this in the VOXporter (after you had had suggested to do so)! I think the latest threads in the last days have given enough ideas for a "VO to X#" part 3 session...
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 49
- Joined: Wed Aug 11, 2021 11:03 am
Class changes - Access / Assigns cannot have the same name as the protected ..
Wowzer!
It worked really well!!!
Mucho gracias!!!
Cheers, JK
It worked really well!!!
Mucho gracias!!!
Cheers, JK
Class changes - Access / Assigns cannot have the same name as the protected ..
Hi Chris,
so I don't feel that stupid now as I had not even noted that option in the VOXporter.
A question: do you are renaming the declaration only or also the places where it is used? (I see that a bit risky, and since I try to fix my code always on the VO side I don't think I will use this option)
Wolfgang
so I don't feel that stupid now as I had not even noted that option in the VOXporter.
A question: do you are renaming the declaration only or also the places where it is used? (I see that a bit risky, and since I try to fix my code always on the VO side I don't think I will use this option)
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Class changes - Access / Assigns cannot have the same name as the protected ..
HI Wolfgang,
It adjusts also the places where it is used. I agree it is a bit risky, this is why the option is disabled by default. But in our tests I think we haven't found any problems so far.
.
It adjusts also the places where it is used. I agree it is a bit risky, this is why the option is disabled by default. But in our tests I think we haven't found any problems so far.
.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu