CLS-complaint

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Agnes

    #1

    CLS-complaint

    What is it ??
    my frmInvoice is heritied from Master Form,
    Master Form will got a method _Print

    my frmInvoice will overrides it , however, in vb.net 2005 .It got a warning
    (not CLS-complaint).
    I don't know what's wrong it is ????
    Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup As
    Boolean)

    Please help


  • Patrice

    #2
    Re: CLS-complaint

    Check but IMO a name that starts with _ is not CLS compliant...

    --
    Patrice

    "Agnes" <agnes@dynamict ech.com.hk> a écrit dans le message de
    news:%23Ar2invN GHA.3936@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > What is it ??
    > my frmInvoice is heritied from Master Form,
    > Master Form will got a method _Print
    >
    > my frmInvoice will overrides it , however, in vb.net 2005 .It got a[/color]
    warning[color=blue]
    > (not CLS-complaint).
    > I don't know what's wrong it is ????
    > Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup[/color]
    As[color=blue]
    > Boolean)
    >
    > Please help
    >
    >[/color]


    Comment

    • Carlos J. Quintero [VB MVP]

      #3
      Re: CLS-complaint

      Hi Agnes,

      See:

      Name <membername> is not CLS-compliant
      http://msdn2.microsoft.com/en-us/library/k5645wwb.aspx

      You can fix the name or change the CLSCompliant attribute value in the
      AssemblyInfo.vb file to False.

      --

      Best regards,

      Carlos J. Quintero

      MZ-Tools: Productivity add-ins for Visual Studio
      You can code, design and document much faster:
      MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.



      "Agnes" <agnes@dynamict ech.com.hk> escribió en el mensaje
      news:%23Ar2invN GHA.3936@TK2MSF TNGP10.phx.gbl. ..[color=blue]
      > What is it ??
      > my frmInvoice is heritied from Master Form,
      > Master Form will got a method _Print
      >
      > my frmInvoice will overrides it , however, in vb.net 2005 .It got a
      > warning (not CLS-complaint).
      > I don't know what's wrong it is ????
      > Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup
      > As Boolean)
      >
      > Please help
      >[/color]


      Comment

      • guy

        #4
        RE: CLS-complaint

        Agnes, is this a migrated vb2003 project?

        if so we had the same problem, and had to create a new project and
        copy/paste the code in, which fixed it - no idea why though

        hth

        guy

        "Agnes" wrote:
        [color=blue]
        > What is it ??
        > my frmInvoice is heritied from Master Form,
        > Master Form will got a method _Print
        >
        > my frmInvoice will overrides it , however, in vb.net 2005 .It got a warning
        > (not CLS-complaint).
        > I don't know what's wrong it is ????
        > Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup As
        > Boolean)
        >
        > Please help
        >
        >
        >[/color]

        Comment

        • Agnes

          #5
          Re: CLS-complaint

          Yes, it is the 2003 project before, copy the code ??
          I got over 80 forms inherited from the Master method and got that warning
          ( 500 warnings in 2005 , it make me crazy)
          Any simple shortcut ?

          "guy" <guy@discussion s.microsoft.com > ¼¶¼g©ó¶l¥ó·s»D: 3AC80A72-9F57-4B4B-AE91-E0377367FE08@mi crosoft.com...[color=blue]
          > Agnes, is this a migrated vb2003 project?
          >
          > if so we had the same problem, and had to create a new project and
          > copy/paste the code in, which fixed it - no idea why though
          >
          > hth
          >
          > guy
          >
          > "Agnes" wrote:
          >[color=green]
          >> What is it ??
          >> my frmInvoice is heritied from Master Form,
          >> Master Form will got a method _Print
          >>
          >> my frmInvoice will overrides it , however, in vb.net 2005 .It got a
          >> warning
          >> (not CLS-complaint).
          >> I don't know what's wrong it is ????
          >> Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup
          >> As
          >> Boolean)
          >>
          >> Please help
          >>
          >>
          >>[/color][/color]


          Comment

          • guy

            #6
            Re: CLS-complaint

            Agnes,
            I wish there was a shortcut - it drives us mad too!
            if anyone knows the reason, can explain it, has a fix PLEASE let us know

            guy

            "Agnes" wrote:
            [color=blue]
            > Yes, it is the 2003 project before, copy the code ??
            > I got over 80 forms inherited from the Master method and got that warning
            > ( 500 warnings in 2005 , it make me crazy)
            > Any simple shortcut ?
            >
            > "guy" <guy@discussion s.microsoft.com > ¼¶¼g©ó¶l ¥Ã³Â·s»D:3AC80 A72-9F57-4B4B-AE91-E0377367FE08@mi crosoft.com...[color=green]
            > > Agnes, is this a migrated vb2003 project?
            > >
            > > if so we had the same problem, and had to create a new project and
            > > copy/paste the code in, which fixed it - no idea why though
            > >
            > > hth
            > >
            > > guy
            > >
            > > "Agnes" wrote:
            > >[color=darkred]
            > >> What is it ??
            > >> my frmInvoice is heritied from Master Form,
            > >> Master Form will got a method _Print
            > >>
            > >> my frmInvoice will overrides it , however, in vb.net 2005 .It got a
            > >> warning
            > >> (not CLS-complaint).
            > >> I don't know what's wrong it is ????
            > >> Public Overrides Sub _Print(ByVal _preview As Boolean, ByVal _printsetup
            > >> As
            > >> Boolean)
            > >>
            > >> Please help
            > >>
            > >>
            > >>[/color][/color]
            >
            >
            >[/color]

            Comment

            Working...