I have been receiving the following errors related to PropertyInfo<String>
C#: Several methods are applicable to '(string,string)'; 'Csla.PropertyInfo<T>.PropertyInfo(string,T)' and 'Csla.PropertyInfo<T>.PropertyInfo(string, string)'
The code that it is complanining about is below
private
static PropertyInfo<string> DescriptionProperty = RegisterProperty(new PropertyInfo<string>("Description", "Project Description"));
Public string Description
{
get { return GetProperty(DescriptionProperty); }
}
Have you tried to update your code to use the lambda parameter?
private static PropertyInfo<string> DescriptionProperty = RegisterProperty(p => p.Description, "Project Description"));
I will give that a try and let you know my results
Thanks
Thanks that appears to work and cleared the error. Not sure why the error occurred in the first place. Or at least why it compiles and works just fine except it is flagged as a Deployment error. I will research that though.
Which version of CSLA are you using and which runtime (NET/SL/WP) throws the exception.
I tried your property info declaration in both .NET4 + WindowsForms and SL4 and it rund just fine.
Copyright (c) Marimer LLC