Ok,
I'm trying to create a class library that enables me to use a enum. Simple I thought. But the
more and more I dig the deeper the rabbit whole goes. I've tried to Substitute the obvious DDD in
the public void Main method still no luck. I'm able to compile but my error "is a type which isn't
valid is DataObjects.DDD is a 'type', which is not valid in the given context. Maybe someone
can correct the error in my ways. Thanks.
///--------------------Class Library Code.
public enum DDD : int{
UserCentric = 1,
RoleCentric = 2 ,
TeamCentric = 3,
OfficeCentric = 4,
LineOfBusinessCentric = 5 }
class Document
{
public void Main(DDD DDD)
{
switch (DDD)
{
case DDD.UserCentric:
System.Console.WriteLine("UserCentric");
break;
case DDD.RoleCentric:
Debug.WriteLine("RoleCentric");
break;
case DDD.TeamCentric:
Debug.WriteLine("TeamCentric");
break;
case DDD.OfficeCentric:
Debug.WriteLine("OfficeCentric");
break;
case DDD.LineOfBusinessCentric:
Debug.WriteLine("LineOfBusinessCentric");
break;
;
///------------------------------------------end of class library code.
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
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;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string mm;
mm = DocumentDataObject.DDD;
mm = Label1.Text;
}
}
Software/Hardware used:
ASKED:
August 11, 2008 8:43 PM
UPDATED:
August 12, 2008 1:52 PM