Statement/keyword to end a METHOD declaration in a CLASS?

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

Statement/keyword to end a METHOD declaration in a CLASS?

Post by Anonymous »

Is there a keyword to end a Method definition besides just having the code end with a RETURN statement?? It looks so naked to me without a closing key work. There is Class Blah / End Class. Is there something similar for Method Blah ..... End Method ??

Here's what I am dreaming of:

Code: Select all

Class Blah

    Constructor()
        Return
    End Constructor


    Public Method Blah() as Boolean

        Return True

    End Method

End Class
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Statement/keyword to end a METHOD declaration in a CLASS?

Post by robert »

Matt,
Some wishes are easier to fulfill then others, especially when no new keywords are needed:
this is planned for the next release, along with other END keywords:

END ACCESS
END ASSIGN
END METHOD
END CONSTRUCTOR
END DESTRUCTOR
END OPERATOR
END PROCEDURE / END PROC
END FUNCTION / END FUNC
END VOSTRUCT
END UNION

and END FOR as alias for NEXT

All will be optional to make sure we stay compatible with previous builds.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply