Geeks With Blogs
Greg Young Greg.ToString() Tips and Tricks .NET (mostly) tips and tricks
Random Useful Code
I don't remember where I got this (so whoever you are thanks but I can't link to you update .. some time ago but it is a quite useful (and portable) way to see if a file is a .NET assembly or not ... If you fall back to the Assembly.LoadFrom method .. you have to fail many times if you are searching many files ... In looking at this again (had nearly forgotten about it until today). It works ......

Posted On Tuesday, May 9, 2006 4:01 PM

MSDN Question: Specifically, I need something that will let me represent decimals with a large amount of precision... Similar to this library:http://www.codeproj... but I need decimal support.If worse comes to worse I'm thinking I can use this and just multiply out the numbers as necessary by a fixed large number (10000000000000000000000000... or something similar), but that really feels like an incredibly dirty hack... So, any ......

Posted On Monday, May 1, 2006 10:20 AM

2.0 Conditional Attributes
Let me just say that so far this is #4 on the best features in 2.0 list. If you remember in 1.x we had the Conditional Attribute that we could use in cases on a class or method. It would allow use to say .. [Conditional(“BarR... class Foo {} If “Bar“ was true, the class would be compiled into the resulting assembly. If not, the class and ALL USAGES of the class would not be compiled into the resulting assembly. This pattern was commonly used for things like debug logging. ......

Posted On Sunday, April 30, 2006 11:20 PM

Dependent in memory assemblies
Another GREAT question in MS newsgroups today. I'm using the CSharpCodeProvider to buils some assemblies @ runtime which are never saved as files (cp.GenerateInMemory = true;).The generated assemblies are hierachically dependent on each other so I generate the "bottom" assemblies first.How do I add a dependency to another previously loaded (generated) assembly?I would be happy if CompilerParameters.Referenc... could take a System.Reflection.Assembly reference as parameter.A possible ......

Posted On Thursday, April 27, 2006 3:14 AM

Hosting another process in your GUI
Someone asked about this today on MS newsgroups so I figured I would blog the answer as others may find this to be useful functionality .. I know I have! I need to display two VB6 applications side by side within a single'windows manager'My thought is that I could use a split screen form, using the 2.0framework and visual studio 2005, that display the UI of each of theVB6 apps within some control or container on the windows form.The obvious solution is to rebuild the VB6 apps as com objects andplace ......

Posted On Wednesday, April 26, 2006 11:06 PM

Copyright © Greg Young | Powered by: