Game Development Reference
In-Depth Information
Example:
public interface IBaseController
{
}
public class BaseController : IBaseController
{
}
Naming Namespaces
When naming namespaces, there are some common rules that should be followed
for consistency. Use Pascal case, and separate all logical components with periods.
The typical formatting is as follows:
CompanyName.TechnologyName.Feature[.Design]
Design is an optional namespace path that can be used when you have design time
code that you are separating from the feature code itself.
Prefixing the namespace with the company name helps to avoid type name conflicts
with another company that's possibly offering the same technology and features.
Additionally, types in a namespace should have dependencies to types in the con-
taining namespace. For example, Wihlidal.Networking.DeadReckoning would have
dependencies to types in Wihlidal.Networking .
Never use the same name for both a class and a namespace. For example, do not
have the namespace Wihlidal.Utilities.Log and have a contained class called Log .
Lastly, just because a particular assembly uses the namespace
Wihlidal.Networking.DeadReckoning , it does not have to contain any code in the
Wihlidal.Networking namespace. It is perfectly acceptable and common to have
multiple assemblies associated with a particular namespace.
Example:
Wihlidal.Networking.DeadReckoning
or
Wihlidal.Controls.InterfaceBuilder
Wihlidal.Controls.InterfaceBuilder.Design
Search Nedrilad ::




Custom Search