fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Interface syntax ? - C# to X#

Interface syntax ? - C# to X# 2 years 3 months ago #1402

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi Robert, Team, Frank and all,

Please can you help me with some suitable syntax for an interface I am converting from Nick's C# code.

I have been translating his code all afternoon and think I have become 'code blind' and/or my brain has frozen ;-0)

Since I have limited experience with Interfaces please guide me.

The attached and inserted image clips should be enough detail for the experienced guys amongst you.



The above is what I start with.

Here is what I tried :-





And here are a couple of images to help :-





Previously, I have managed with interfaces with only methods, and in Nick's code I think this is the first one with what looks to me like a property.

HELP !!!

Phil.
Wales, UK.

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1403

  Frank Maraite's Avatar Frank Maraite Offline Posts: 173
Phil

Property DSDbEntityState as DSDbEntityState GET SET

Frank

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1404

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Thanks a bunch Frank, it works just fine - see attached.

So why does auto not work ? Robert will need to give one of his 'deeper' explanations.



Well, onwards and upwards, I will keep testing the VS integration.

Have already found a few useful issues to feed back to the Team.

Best regards to all,
Phil.
Wales, UK.
Attachments:

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1405

  robert's Avatar robert Offline Posts: 994
Phil,

The Auto clause is used to declare a property with an AUTOmatic backing field. Interface members cannot have backing fields.
I guess we could make AUTO a synonym for GET SET but I personally thing the syntax is OK at this moment.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1406

  Frank Maraite's Avatar Frank Maraite Offline Posts: 173
Phil,

an interface says something about how to access a member. The AUTO clause says how it is actually implemented. These are two diferent things.

Robert, I would not allow AUTO because it's mixing up things.

Frank

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1407

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Hi and thanks Robert,

Yes, I understand, so the 'auto' is for an automatic backing field facility to be put in place - not just the 'get set' - makes sense as it is.

I will send to you directly a couple of things I discovered yesterday about the current VS integration. Not BIG issues but ones which should be addressed and corrected I feel, to improve the 'operation & look-feel' for others.

Power to my finger tips ! Have a nice day.

Cheers,
Phil.
Wales, UK.

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1408

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Frank,

... Agreed ...

Cheers,
Phil.
Wales, UK.

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1409

  robert's Avatar robert Offline Posts: 994

Phil Hepburn wrote: H
I will send to you directly a couple of things I discovered yesterday about the current VS integration. Not BIG issues but ones which should be addressed and corrected I feel, to improve the 'operation & look-feel' for others.


Please do not send them as images (with the exception of error dialogs of course), but as real text. That makes it much easier to reproduce the problems.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Interface syntax ? - C# to X# 2 years 3 months ago #1410

  Phil Hepburn's Avatar Topic Author Phil Hepburn Offline Posts: 742
Oh! - if live were only so simple ;-0)

Thanks Robert, I will do my best !

Phil.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1