|
-
September 8th, 2008, 03:03 AM
#9
Re: convert *.cs file to object
I found the same example and it works. But just for a class that doesn't use other classes. I added a custom attribute to the properties:
[DBColumn("t_ID", true)]
public int ID {
get { return _ID; }
set { _ID = value; }
}
the attribute 'DBColumn' is in another file and class (but in the same namespace)
public class DBColumn: Attribute {
private string _ColumnName;
private bool _IsKey;
....
}
So when I try to compile now I get the error:
"TestClass.cs(13,8): CS0246: The type or namespace name 'DBColumn' could not be found (are you missing a using directive or an assembly reference?)"
So I tried first to compile the class DBColumn and after that the TestClass. But still the same error. How can I fix this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|