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

TOPIC:

XS9016 Class name .. differs : just by adding optional class statement 18 Aug 2022 22:27 #23384

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1574
  • Consider this:
    Public Partial Class NewEmail
    Method AcceptSaveAndSendEmail() As Logic Pascal Class NewEmail
    Return Self:AcceptAndSaveAndOrSendEmail(True, False, True, Null_date) 
    
    Method AcceptAndSaveAndOrSendEmail(lSend As Logic, lAuto As Logic, lCheckAddress As Logic, dSendDate As Date) As Logic Pascal Class NewMail
    ENDCLASS //Newmail

    As you can see I add Class (something) like in VO as this makes it directly visible in which class you are working which in VS requires you to look to the upper left of the screen while it doesn't show when you are browsing.

    So the CLASS xx is optional, like a comment.

    Why then do I get this error in the 2nd method then? The first method is fine, with the 2nd method just below (so in the same class) the 1st, only this error shows (until I remove class NewMail again which I don't want)

    Error XS9016 Class name NewMail for method differs from parent class name NewEmail

    Dick

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

    XS9016 Class name .. differs : just by adding optional class statement 18 Aug 2022 23:40 #23385

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • Hi Dick,

    The class name (and class clause in the first method) is "NewEmail", while the class clause in the second method is "NewMail"
    XSharp Development Team
    chris(at)xsharp.eu

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

    XS9016 Class name .. differs : just by adding optional class statement 19 Aug 2022 01:02 #23387

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1574
  • Hello Chris,

    Yes! How could I miss that.
    It makes me wonder one thing. I thought adding Class XX after a method was merely info. Like I could write anything, a comment.

    But the compiler is actually doing something with it I now understand?

    Dick

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

    XS9016 Class name .. differs : just by adding optional class statement 19 Aug 2022 06:37 #23389

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • Hi Dick,

    Yes, of course, the X# compiler does make a lot of checks to see if what you type is valid. It's not like in VO, where you can accidentally write a lot of incorrect things or typos and the compiler does not even warn you ;)
    XSharp Development Team
    chris(at)xsharp.eu

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

    Last edit: by Chris.
    • Page:
    • 1