Sometimes your medicine bottle has on it, Shake well before using. That is what God has to do with some of His people. He has to shake them well before they are ever usable.
Vance Havner

Anyone who conducts an argument by appealing to authority is not using his intelligence; he is just using his memory.
Leonardo DaVinci

Chance is the pseudonym God uses when He does not want to sign His name.
Anatole France

When writing C# applications, I use third party assemblies.  Some of the classes in these libraries are very generic sounding, like Document or Repository.

All the sample code shows the code with using clauses.  Frequently, I get lost in which namespace the classes, methods, properties and enums come from.  The code below shows this confusion.


using AnotherBigCompany.Data;
using AnotherBigCompany.Lib;

public void SomeMethod()
{
  Document myDoc = new Document();

  // I could do this wordy way instead to help record the namespace structure.
  AnotherBigCompany.Lib.Document myDoc2 = AnotherBigCompany.Lib.Document();
}

I prefer the using alias. This allows for self documentation without the penalty of being wordy and losing readability.


using ABC = AnotherBigCompany;

public void SomeMethod()
{
  ABC.Lib.Document myDoc = new ABC.Lib.Document();
}

Leave a Reply


*