1. Anonymous Methods scope question - CSharp/C#
2. Critical sections and method scope variables
Hi, look at this:
VALUE A::Method(int aa, int ab)
{
float lv;
VALUE ret;
EnterCriticalSection(handle);
(... access shared resource and local variables ... )
LeaveCriticalSection(handle);
return ret;
}
There are more than one thread executing this method. So I ask:
- Will I have problems with "aa", "ab", "lv" or "ret"?
- The variables listed before will be allocated at some kind of thread stack
?
- There are any function that leaves the critical section only after
returning "ret" ?
Thanks...
Rafael Pivato
4. ADSI returning groups in Global scope and Domain local scope instead of Universal scope
Hi everyone,
I'm having a problem with reading user groups on Active Directory using C#.
It returns all the groups in the Universal scope for a specific user.
However, I only need the groups in Global scope and Domain local scope. Does
anyone know I can modify the following code to this?
DirectoryEntry entry = new DirectoryEntry("LDAP://" + Domain, CurrentUser,
pwd, AuthenticationTypes.Secure);
DirectorySearcher mySearcher = new DirectorySearcher(entry);
// Change this search for anything
mySearcher.Filter = ("(sAMAccountName="+CurrentUser+")");
try
{
System.DirectoryServices.SearchResult resEnt = mySearcher.FindOne();
// Display all groups for this user
object obGroups = de.Invoke("Groups");
foreach (object ob in (IEnumerable)obGroups)
{
DirectoryEntry obGpEntry = new DirectoryEntry(ob);
group = obGpEntry.Name.Replace("CN=", "");
Response.Write("Group: " + group + "<br>");
}
...
Thank you
Maz A.
5. variable scope inside a method - CSharp/C#
6. Scope of internal method in C#?
I've seen lots of mentions of the scope of an "internal" class. What's the scope of an "internal" method. Why would one use it as opposed to an "internal" class? Thanks in advance. Adam
7. ANN: Product Scope 7 and Profile Exchanges enhanced with SetupCast publishing methods