Definition
Partial class is just one way to separate two parts of the code of a class in distinct files. It has no special secrets or semantics. It is essentially a way to facilitate the organization of code and to indicate to the compiler that the two codes available in the two files with a class of the same name is not a duplication error, but one code is complementary to the other and must be compiled as if it were one thing only.
Use
In general this type of artifice should only be used by code generators, so a part is generated in a file and no one should tinker with this file. In another file have the parts of the class code that the programmer can move without causing problems.
Of course, nothing prevents the programmer from tampering with the generated part, but it should not. It's an organizational protection just to make it clear what parts you can move and parts you can not, but it does not really protect.
If you are going to create some class that needs to be partial, just use the partial
modifier before class
to indicate that there will be another part. Do this in both files that have both parts. You do not need anything else. But remember that you should only use this if you create a generator and want a part not to be modified.
Partial Method
In the above documentation we talk about partial method which is a method that only has the declaration without a body. In this case the body will be in the other file. It is a way of ensuring that the signature of the method is not changed in the other file. If it is changed, the compiler will report problems.
Do not tamper with generated code
So the file you want to move should not be tampered with.
Where to find the files
The files usually stay together in the project, but in the same folder, in some other related. Try to scan through Windows Explorer for all files available in the project. The file name will probably make some mention of partial or designer or at least have a name similar to the file you want to move and can not find. If you find it in Windows Explorer, it may be easier to find it in VS.
See in VS if the files are not grouped in the project. Click the plus [+]
sign to open the related files. Depending on the summer it may be a triangle or other symbol, but that's what opens the tree of files.
But I will strengthen, do not edit this part unless you know a lot what you are doing and know all the implications, which should not be the case.