Modifiers explained in help file???

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

Modifiers explained in help file???

Post by Anonymous »

Where can I find a complete explanation/definition each of the Modifiers that can be used when defining a Member, Property, or Method on a Class??

Here is the list of Modifiers listed in online Help for Members, but I looked everywhere trying to find a description or definition of these and I simply could not find it.

Code: Select all

 PRIVATE | HIDDEN | PROTECTED | PUBLIC | EXPORT | INTERNAL | STATIC | VIRTUAL | SEALED | ABSTRACT | ASYNC | UNSAFE | EXTERN | OVERRIDE
User avatar
lumberjack
Posts: 723
Joined: Fri Sep 25, 2015 3:11 pm

Modifiers explained in help file???

Post by lumberjack »

FoxProMatt_MattSlay wrote:Where can I find a complete explanation/definition each of the Modifiers that can be used when defining a Member, Property, or Method on a Class??
Here is the list of Modifiers listed in online Help for Members, but I looked everywhere trying to find a description or definition of these and I simply could not find it.

Code: Select all

 PROTECTED can only be called inside of a class or derived class
HIDDEN/PRIVATE can only be called in the class it is defined in
PUBLIC | EXPORT can be used by objects created from the class or derived classes
INTERNAL can only be called in the assembly it is created in
STATIC it is part of the class not the object, e.g. functions/procedures, or Singleton.Inst typical examples
VIRTUAL maybe the DevTeam can expand on this
SEALED you cannot subclass this class
ABSTRACT you can only subclass this, cannot directly inherit from it
ASYNC asynchronous call
UNSAFE normally used with unsafe Win32 code
EXTERN external, DevTeam to expand
OVERRIDE you can replace this in a subclass
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Modifiers explained in help file???

Post by Chris »

Johan, small correction, PRIVATE and HIDDEN are synonyms. It's PROTECTED that is different to them.

About VIRTUAL/OVERRIDE (and NEW), it's the same as in c#:

https://docs.microsoft.com/en-us/dotnet ... ds/virtual
https://docs.microsoft.com/en-us/dotnet ... s/override
https://docs.microsoft.com/en-us/dotnet ... w-keywords
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
FoxProMatt

Modifiers explained in help file???

Post by FoxProMatt »

Johan - please edit your post per Chris's notes.

Chris - this should be easily found in the help file...
Post Reply