Detecting If You Are An Admin

This came up on an internal alias. A customer wanted to know how to determine if there were running as an admin in a tool. Below is a sample program that will print out whether or not you are the machine admin or a member of the machine administrators group.

Coding Quiz Anonymous Type Types

Question: How can you create a variable in VB which is typed as an anonymous type but not actually create an instance of that type?

Imetadataimport Getparamformethodindex

While investigating a recent bug I found about an interesting return for GetParamForMethodIndex. On a perfectly verifiable assembly, a call to GetParamForMethodIndex was returning a failure code. After some searching I found the return code was CLDB_E_RECORD_NOTFOUND. I was surprised at first because it’s a verifiable assembly so how could the record for a parameter I knew existed not be there?

Closures In Vb Part 5 Looping

For previous articles in the series please see

Closures In Vb Part 4 Variable Lifetime

For previous articles in this series please see