Opinions on how to use My as a class name prefix
I've never seen this in production code, although I dare say it exists.
It is similar to the "foo" and "bar" metasyntatic variables — usually used as a placeholder for the real name.
So, for example, if I know that someone has their own class derived from Form
, but I don't know anything about it, the example code would use:
public class MyForm : Form
I would of course stick to this rule for real code :)
source to share
I am assuming that one instance where it would be close to valid is the class you prefix "Mine" is an inner class (ie a private class declared in another class). I'm not sure if there are any naming conventions that govern the inner classes, but this might be one way to tell the difference.
source to share
I would avoid this in production code, your type name should reflect the function it should perform.
I've used it a couple of times when fixing / cracking third party code, for example replacing with Controller
to MyController
make it clear that this is a hack that should be treated with care and bat.
source to share