Hello,
I am defining a class as follows:
stat = new Stat {
Count = Roles.GetUsersI nRole(RoleType. Administrator.T oString
()).Count(),
Share = Count / UserCount * 100,
UserCount = Membership.GetA llUsers().Count
};
Is there a way to make:
Share = Count / UserCount * 100,
To work?
I mean, at the moment, Count and UserCount are not being recognized.
I understand why ... I am just trying to figure if there is a way to
declare this instance in one step without repeating the code like:
Share = Roles.GetUsersI nRole(RoleType. Administrator.T oString()).Coun t
() / Membership.GetA llUsers().Count * 100
Thanks,
Miguel
I am defining a class as follows:
stat = new Stat {
Count = Roles.GetUsersI nRole(RoleType. Administrator.T oString
()).Count(),
Share = Count / UserCount * 100,
UserCount = Membership.GetA llUsers().Count
};
Is there a way to make:
Share = Count / UserCount * 100,
To work?
I mean, at the moment, Count and UserCount are not being recognized.
I understand why ... I am just trying to figure if there is a way to
declare this instance in one step without repeating the code like:
Share = Roles.GetUsersI nRole(RoleType. Administrator.T oString()).Coun t
() / Membership.GetA llUsers().Count * 100
Thanks,
Miguel
Comment