locked
Missing partial modifier on declaration of type 'Name of Class'; another partial declaration of this type exists RRS feed

  • Question

  • User-253940806 posted

    I'm getting the error in the subject from a new file with a distinct name from the rest of the files in my project. I've looked online. From what I have read, the name has been declared some where else, but this is a new file with a distinct name. As in, no other file has this name.

    Wednesday, June 6, 2018 12:34 PM

Answers

  • User753101303 posted

    Hi,

    The file name doesn't matter. You likely have the same class name declared in the same namespace in some other files. Do maybe a project wide search for "class XXX" in all your cs files.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 6, 2018 12:44 PM

All replies

  • User753101303 posted

    Hi,

    The file name doesn't matter. You likely have the same class name declared in the same namespace in some other files. Do maybe a project wide search for "class XXX" in all your cs files.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 6, 2018 12:44 PM
  • User-253940806 posted

    For some reason when I added the new file VS created a designer file as well as a resx file.

    Wednesday, June 6, 2018 12:59 PM