IWorkspaceFactory pworkspacefactory = new FileGDBWorkspaceFactoryClass();
IWorkspace pworkspace = pworkspacefactory.OpenFromFile(@"C:\temp\temp1\Data.gdb", 0);
IFeatureWorkspace pfeatureworkspace = pworkspace as IFeatureWorkspace;
IWorkspaceDomains pwsDomain = pworkspace as IWorkspaceDomains;
IEnumDomain penumdomain = pwsDomain.Domains;
ICodedValueDomain pCodevalueDomain = null;
IDomain pDomain= penumdomain.Next();
Hashtable CodeVal = new Hashtable();
while (pDomain != null)
{
pCodevalueDomain = pDomain as ICodedValueDomain;
Hashtable codVal = new Hashtable();
for (int i = 0; i < pCodevalueDomain.CodeCount; i++)
{
codVal[pCodevalueDomain.get_Name(i)] = pCodevalueDomain.get_Value(i);
}
CodeVal[pDomain.Name] = codVal;
pDomain = penumdomain.Next();
}