S
shapper
Hello,
I am defining a class as follows:
stat = new Stat {
Count = Roles.GetUsersInRole(RoleType.Administrator.ToString
()).Count(),
Share = Count / UserCount * 100,
UserCount = Membership.GetAllUsers().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.GetUsersInRole(RoleType.Administrator.ToString()).Count
() / Membership.GetAllUsers().Count * 100
Thanks,
Miguel
I am defining a class as follows:
stat = new Stat {
Count = Roles.GetUsersInRole(RoleType.Administrator.ToString
()).Count(),
Share = Count / UserCount * 100,
UserCount = Membership.GetAllUsers().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.GetUsersInRole(RoleType.Administrator.ToString()).Count
() / Membership.GetAllUsers().Count * 100
Thanks,
Miguel