A
Andrew Connell
I have a method which returns a value via an out parm. Here's the prototype of the function:
public DbActionResult Insert(out int securityGroupID, string title, string description)
Now, when I try to pull the value out of that list, no matter the syntax, I can't get it to work... keep getting an error of "can't convert out int to int" or vice versa.
Data.SecurityGroup sg = new Data.SecurityGroup();
result = sg.Insert(out securityGroup.GroupID,
securityGroup.Title,
securityGroup.Description);
_securityGroup = securityGroup;
Any ideas what's throwing my error? It looks like everything I'm doing is correct. I also tried using a temp variable (int goupID = 0) in place of the securityGroup.GroupID property and then assigning that temp to the object property, but I got the same error.
public DbActionResult Insert(out int securityGroupID, string title, string description)
Now, when I try to pull the value out of that list, no matter the syntax, I can't get it to work... keep getting an error of "can't convert out int to int" or vice versa.
Data.SecurityGroup sg = new Data.SecurityGroup();
result = sg.Insert(out securityGroup.GroupID,
securityGroup.Title,
securityGroup.Description);
_securityGroup = securityGroup;
Any ideas what's throwing my error? It looks like everything I'm doing is correct. I also tried using a temp variable (int goupID = 0) in place of the securityGroup.GroupID property and then assigning that temp to the object property, but I got the same error.