I’m building a library that’s called “Fieldsearch” and I need people to invoke it like this:
FieldSearch x = new FieldSearch();
Problem is, if my solution is called FieldSearch and my class library is called FieldSearch.Lib, I can’t call the actual class FieldSearch.
'Foo' is a 'namespace' but is used like a 'type'
What do you suggest I do for this case, sans calling my actual class something else?
Generally the best practice is to use the plural form for namespaces and the singular for classes therein. For example,
System.Windows.Formscontains a class calledForm.So in this example, your namespace could be called
FieldSearches(orCompanyName.ProductName.FieldSearchesif you want to use that convention). Now the “FieldSearch” class won’t match the namespace.