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?