c# - Problem creating objects, class could not be found -
in blllanguage.cs
class not able create dallanguage
class's objects , vice versa. says dallanguage.cs
/blllanguage.cs
not found. whats wrong code below?
blllanguage.cs
using system; using system.data; using system.configuration; using system.linq; using system.web; using system.collections; using system.web.security; using system.web.ui; using system.web.ui.htmlcontrols; using system.web.ui.webcontrols; using system.web.ui.webcontrols.webparts; using system.xml.linq; using proj2; namespace proj2.bll.main.setting { public class blllanguage { public blllanguage() { //add constructor code here } #region properties /// <summary> /// properties /// </summary> private int intlanguageid; private string strdescription; private string strvalue; #endregion public int languageid { { return intlanguageid; } set { intlanguageid = value; } } public string description { { return strdescription; } set { strdescription = value; } } public string value { { return strvalue; } set { strvalue = value; } } #region getlanguage /// <summary> /// getlanguage /// </summary> /// <returns></returns> public dataset getlanguage() { dallanguage objdallanguage = new dallanguage(); // error here dataset dsgetlanguage = objdallanguage.getlanguage(); return dsgetlanguage; } #endregion } }
dallanguage.cs
using system; using system.data; using system.configuration; using system.linq; using system.data.sqlclient; using system.web; using microsoft.applicationblocks.data; using system.web.security; using system.web.ui; using system.web.ui.htmlcontrols; using system.web.ui.webcontrols; using system.web.ui.webcontrols.webparts; using system.xml.linq; using proj2; namespace proj2.dal.main.setting { public class dallanguage { public dallanguage() { //constructor code here } #region getlanguage /// <summary> /// getlanguage /// </summary> /// <returns></returns> public dataset getlanguage() { dataset dsgetlanguage = new dataset(); try { dsgetlanguage = sqlhelper.executedataset(constants.connectionstring, commandtype.storedprocedure, "[main].[sp_getlanguage]"); } catch (exception ex) { throw ex; } return dsgetlanguage; } #endregion } }
the namespaces not match
proj2.bll.main.setting proj2.dal.main.setting
you need specify qualified name or import namespaces. importing proj2 not enough
Comments
Post a Comment