Trying to Move to C# - Part II

Trying to Move to C# - Part II

Old forum URL: forums.lhotka.net/forums/t/12870.aspx


ebick posted on Thursday, April 23, 2015

In my continuing attempt o write a business base class in C# (very familiar with VB), I found several samples that say the following code should work. However I am getting errors.  I am using the latest 3.8 CSLA

Problem #1

 protected override void AddBusinessRules()

Problem #2

ValidationRules.AddRule(Csla.Validation.CommonRules.StringRequired, new Csla.Validation.RuleArgs(NameProperty));

For both problems, the problem word (void/Csla), the error is:

Error 1 Expected class, delegate, enum, interface, or struct

Any help?  Thanks in advance.
Ed

JonnyBee replied on Friday, April 24, 2015

Sounds like your code is missing some curly brackets ({ or }) or they are not correctly placed. 

ebick replied on Friday, April 24, 2015

D'oh!

Sorry, thanks.

Copyright (c) Marimer LLC