locked
partial classes in visual studio RRS feed

  • Question

  • User69384874 posted

    If I add a new class to a project, and then use the partial keyword on it, I can't add a new class with the same name to extend the partial class. VS tells me it can't create the class because one with that name already exists. I am just wanting to experiment with partial classes in a console application. So my question is, how do I create a partial class with the same name?

    Saturday, November 3, 2012 11:26 AM

Answers

  • User-691245060 posted

    you can have different file names. but inside these CS files, you can have same partial classes....then it will compile and will be nmerged into one class...

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 3, 2012 11:44 AM

All replies

  • User-691245060 posted

    you can have different file names. but inside these CS files, you can have same partial classes....then it will compile and will be nmerged into one class...

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 3, 2012 11:44 AM
  • User69384874 posted

    Thanks! That helped alot.

    Saturday, November 3, 2012 4:20 PM