title: Why has Visual Studio marked my class as a component?
body: <p><img src="https://i.stack.imgur.com/SmuZE.jpg" alt="A class diagram"></p>
  
  <p>I have copy pasted some classes into this project, some from other projects. At some point VS has marked <code>Class1</code> as a component (you can see from the icon shown in the screenshot above). <code>Class2</code> is OK. There's no difference in the <strong>File Properties</strong> and no interesting difference in the code between <code>Class1</code> and <code>Class2</code> (*except see <strong>edit</strong> below)</p>
  
  <p>It doesn't stop the code from compiling or running. Is it in fact a problem at all? It <em>is</em> inconvenient in that the IDE tries to open the Design window if you double click the file.</p>
  
  <p>How does this happen, and how to fix?</p>
  
  <p><strong>Edit:</strong> Actually, there are interesting differences in the code window. At least, there must be, since removing a large chunk of the code causes the Solution Explorer to revert the file to a <em>Class</em> file. Restore the chunk and the file goes back to being a <em>Component</em>. Currently... investigating.</p>