here is the rest of the code:
using System;
using System.Collections.Generic
using System.Linq;
using System.Text;
using System.Data.Linq;
namespace CPMS_DAL.Framework
{
public interface IENTBaseEntity
{
DateTime CreateDate { get; set; }
int CreateByID { get; set; }
DateTime UpdateDate { get; set; }
int UpdateByID { get; set; }
Binary Version { get; set; }
}
}
--------------------------
using System;
using System.Collections.Generic
using System.Linq;
using System.Text;
using CPMS_DAL.Framework;
namespace CPMS_DAL
{
public partial class cl_Accounts : IENTBaseEntity
{
#region IENTBaseEntity Members
DateTime IENTBaseEntity.CreateDate
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
int IENTBaseEntity.CreateByID
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
DateTime IENTBaseEntity.UpdateDate
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
int IENTBaseEntity.UpdateByID
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
System.Data.Linq.Binary IENTBaseEntity.Version
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
#endregion
}
}
--------------------------
Main Topics
Browse All Topics





by: psasikPosted on 2009-08-20 at 13:35:09ID: 25146880
From: http://msdn.microsoft.com/ en-us/libr ary/ms3795 64(VS.80). aspx
.
Generics and Casting
The C# compiler only lets you implicitly cast generic type parameters to Object, or to constraint-specified types, as shown in Code block 5. Such implicit casting is type safe because any incompatibility is discovered at compile-time.
...
This means that generic collections will not implicitly cast either... Also, this might not be enough code to look at. Where is your tbl_Account type defined?
List<CPMS_DAL.tbl_Account> != List<CPMS_DAL.cl_Accounts>..