Overview of posts containing reflection

May 4, 2010

Active Directory Tip #4 – Get Large Integer (e.g. Account expires date)

Certain properties, like usnChanged or accountExpires, are in an IADsLargeInteger format. One way to read out the long representation of the value of such a property is by reflection. PLAIN TEXT C#: private static long ConvertLargeIntegerToLong(object largeInteger) {   Type type = largeInteger.GetType();     int highPart = (int)type.InvokeMember("HighPart", BindingFlags.GetProperty, null, largeInteger, null);   int [...]

July 13, 2008

Weird surprise while using FlattenHierarchy on interfaces

Filed under .NET,C#,IT,Programming

Consider this: PLAIN TEXT C#: public interface IDeap {     long Id { get; } } public interface IHierarchy : IDeap {     string Name { get; } } Now please take a pen and paper and write down whatever you think is the integer stored in "answer". Here: PLAIN TEXT C#: PropertyInfo[] [...]

February 14, 2008

Source Structure (Part 3): Be aware of long project names, or …

... why 260 chars really is not that much. Have you ever seen this error message, while starting a new project? "The length of the full path for the solution, project or item you are creating exceeds the maximum path length allowed by the system. You must reduce the length of the name or the [...]

December 21, 2007

Weird behaviour when binding to (the programmatic construct) interface

Well, a couple of days ago a coworker and I came across a very strange behaviour concerning Expression Blend while binding to a generic list of an interface. And we were able to reproduce the same behaviour in Visual Studion 2008 as well. In our example ObservableCollection, where Mitarbeiter is the German word for employee. [...]

October 5, 2006

New Visual Studio Orcas CTP

Filed under .NET,IT,Programming

There is a new CTP of Orcas available for download. It is packed as a virtual PC image and available here: Microsoft Download Just remember: You need Virtual PC in order to run this image (freely available 500MB)! Plus you need the VSCTPBase (also downloadable on that site 1,1GB), so it is quite a bit [...]

May 31, 2006

Fast Dynamic Property Access in C# using Reflection.Emit

I just read an extremely interesting article on CodeProject called: Fast Dynamic Property Access with C# by James Nies. Wow, I am really impressed both by the idea to use Emit in this genius way and by the coding style. Very nice work. So, I had to sit down and port it to .NET 2.0 [...]

May 25, 2006

On the road again

For all of you waiting for the continuation of my previous partial post about custom attributes and reflection. Well, hopefully it will be done on Monday. I'll be spending a LOT of time in trains the next 4 days. And that should create enough "spare" time for me to finish my work on a hopefully [...]

May 3, 2006

Having fun with Reflection and custom Attributes

Filed under .NET,C#,IT,Programming

I've got a very weird project: I have to convert a message into a string-array and a protocol code and back. The communication layer can only send fields of string. I know, I could serialize, zip and encode as base64 for example. But that's not an option. Why? That's top secret. It has to be [...]

Tobi + C# = T# - Blogged blogoscoop