DYK #3 - How can you find out if a method/class/field was annotated with any Attributes without looking at the code?

by rahul 12/12/2008 4:52:00 AM
Well... first of all, open ILDASM and drag/drop your EXE.   The application is called Attributes, and contains an annotated class, some annotated methods and fields. Notice the .custom instance void Attributes.xxxxxxxxx highlighted above. This tells you that the class is annotated. Now, how would you tell if Bar, Foo, and FooBar methods or AttributedVar, NonAttributedVar are annotated or not? (as if the names were not self-explanatory) Double clicking on AnotherAttributedVar and NonAttri... [More]


Play with Colors - Part 2 - Check the font on a specific background using .NET reflection

by Rahul 6/13/2008 2:30:25 AM
I have already shown how to use .NET reflection to get the information about all the colors in .NET. Let's say you want to check out how a specific colored font would appear on any background, you may like to check this sample. Use the code which follows to get an output like the one below. There are various ways to get this output, but I guess this code is pretty small and will show you some of the things that you could do with System.Reflection in .NET. Here is the code... <%@ ... [More]


Play with Colors - Part 1 - See all the colors using .NET reflection

by Rahul 6/10/2008 11:58:00 AM
When you work on designing a website, you may find it difficult to remember all the color names and visualize them. At least, I am personally not very good with color selection and find it really hard to recall the color names. So, in this scrap we will check out how to use .NET reflection to print out all the color names along with the colors... There is a very small piece of C# code which I have used here to create a 2 column color table. Check the sample And here is the code that would ... [More]


Search


Tags



Categories

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

All Items
Sign in

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0