I've made a struct just to make my life easier by grouping a few repeated variables together. This struct is defined in the same .cs file as the class that is using it. I've made the struct public, but that means as I'm typing in other files, intellisense often includes it in the possible auto-completion options. It's a mild nuisance, but if there was a way to tell it I'm only ever going to use this struct within this file, that'd be great.
Instead of 'public,' I noticed I can't use 'private' or 'static.' It looks like 'internal' doesn't give an error, but only limits to this project, not down to the file. The description for 'file' sounds right, but I get an error when I declare one, even private, within a public class also defined in that file. In general, the layout looks like below right now, but I'm looking for an alternative to declaring the struct public
namespace MyProjectNamespace
{
public struct MyHelperStruct
{
public int memberA;
public bool memberB;
public DateTime memberC;
// ...
}
public class MyClass
{
private List _myVars;
}
}