Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > dotnet clr > may 2006

InvalidCastException
Posted by Lars at 5/29/2006 2:39:20 PM
Hi, I get a InvalidCastException: - ex {"Unable to cast object of type 'SecSoaService.NFFIServiceParameters' to type 'SecSoaService.NFFIServiceParameters'."} System.Exception {System.InvalidCastException} The Object beeing casted originates from a Serialize / Deserialize roundtrip. I h...more >>


Reading assembly manifest without loading assembly
Posted by Dale at 5/27/2006 9:44:01 AM
I am working on a web application that is used for migrating other web applications to production. The application currently loads each dll in the target application using Assembly.LoadFile and then calls GetCustomAttributes on the assembly to ensure it was not built in debug mode. The p...more >>

Late binding to events without typelib?
Posted by Jon Davis at 5/25/2006 9:13:14 PM
I'm using CLR (VB.NET -- C# and even C++ are options if necessary) to late-bind to an object at runtime. It's easy to late bind to method and property members (Dim obj as Object = myObj : Return obj.Name). I don't have access to any sort of type library, which is why I'm late-binding. Seems to...more >>

how to resolve 'System.InvalidOperationException'
Posted by mohan NO[at]SPAM tek.com at 5/23/2006 10:52:43 PM
Hi all, I have ported my VB.Net project from VS2003 to VS2005. I am calling mainform instance (static variable) from other VB .net modules from the same projects.In VS2003 ,I did not face any issues. But in VS2005 ,I am getting the following exception. "A first chance exception of type ...more >>

'LoaderLock' Issue
Posted by mohan NO[at]SPAM tek.com at 5/23/2006 10:38:43 PM
Hi all, I have ported my VB.Net project from VS2003 to VS2005. I am using some unmanaged code in my project. while running my application,Iam getting the following error "Managed Debugging Assistant 'LoaderLock' has detected a problem in 'F:\VBSource\bin\Debug\TekRobo.exe'. Additional Inf...more >>

How to resolve :Error 1 Command line error D8016 : '/MT' and '/clr:oldsyntax' command-line
Posted by mohan NO[at]SPAM tek.com at 5/23/2006 10:30:47 PM
Hi all, I have ported my project from VS2003 to VS2005 The project contains both unmanaged codeand managed code.While compiling I got the following errors: Error 1 Command line error D8016 : '/MT' and '/clr:oldsyntax' command-line options are incompatible cl " Can anyone help me to resolve...more >>

make Internal access more logical and less physical
Posted by Mountain at 5/22/2006 5:02:39 PM
If a large framework (or library, application, etc.) has optional parts and some users may not want all parts, it would make sense to break the framework into separate physical assemblies. However, if internal access is specified in the monolithic framework, a problem arises because changing int...more >>

Memory Not Being Claimed
Posted by Mike King at 5/19/2006 8:24:51 AM
Can someone please explain why the DataSet isn't being collected? If I un-comment "dr = null", then the memory is freed. using System; using System.Data; class Class1 { [STAThread] static void Main(string[] args) { DataSet ds = new DataSet(); DataTable dt = ds.Ta...more >>



Performance trouble with assemblies!
Posted by Hans at 5/19/2006 12:00:00 AM
Hi! I have two C# assemblies (dll) and one desktop testprogram (also C#) and when I start my testprogram and press the button that will use methods in my two assemblies it goes really slow the first time. I thought this had to do with the JIT. The strange thing is that if I start my testapp...more >>

Forcing type initialization
Posted by Ole Nielsby at 5/16/2006 8:55:24 PM
I want to enforce certain type initializers in an assembly to run at startup. foreach (Type t in Assembly.GetExecutingAssembly().GetTypes()) { if (...some criteria...) { t.TypeInitializer.Invoke(type,new object[0]); } } This doesn't work. What's the simplest way ...more >>

GetProperty BindingFlags question concerning Friend properties
Posted by Rob Nicholson at 5/13/2006 12:53:37 PM
I've using Reflection to get a value from a property in a class and I needed to modify it to allow Friend properties to be included: PropertyInfo = Me.GetType.GetProperty(Name, BindingFlags.Public Or BindingFlags.NonPublic Or BindingFlags.Instance) Now I understand what the Public & NonPub...more >>

Mult-threaded Garbage Collector error in manange/unmanaged application
Posted by Mark at 5/11/2006 10:34:05 AM
I have a multi-threaded application using both managed (C#/.NET) and unmanaged code (C++). The unmanaged code calls into the manage code (via COM Interop) to perform a variety of tasks. Every two or three days the application would unexpectedly crash; I added a GC.Collect() call to the end of ...more >>

Fast tailcall
Posted by Ole Nielsby at 5/11/2006 12:48:39 AM
Are there any things one can do to assist the jit in generating efficient tail call optimization? If a method with many parameters ends calling a similar method with a similar but not identical signature, and some of the parameters are passed unchanged, will the jit then discover it can simpl...more >>

Unmaged Code
Posted by TARUN at 5/10/2006 11:05:42 PM
Hello All I need to sak one question related to the CLR and Managed And Unmanage Code I read in the MSDN that ..... The code which is targetting CLR is managed code. The code which is not targetting CLR is unmanaged code Unmanged Code Means which directly interact with OS functionalty. ...more >>

written language of framework class library
Posted by wukun at 5/10/2006 7:34:01 PM
what languages can be used to write the framework class library, especially the data structure library, such as System.Collections. ...more >>

Extend compiler (pre compile)
Posted by eacsub at 5/9/2006 9:46:01 PM
I would like to solve the problem of method parameter verfication in order to avoid to writing repetitive code to validate method parameters, for example: void method(object param) { if (param = null) { throw new ArgumentNullException("param"); } } and do it throw atti...more >>

Framework 2.0: Ignore GAC when loading referenced assembly
Posted by pdxfilter-google NO[at]SPAM yahoo.com at 5/8/2006 5:53:46 PM
Here's a fun one: Our Windows Forms application uses the Crystal Reports .NET assemblies, which we ship and reference privately from our application folder. These assemblies have strong names. Works great - most of the time. Other vendors of Crystal applications will often register these DL...more >>

ThreadAbortException in SleepInternal
Posted by Jim Sneeringer at 5/7/2006 2:50:01 PM
A ThreadAbortException happens about 5-6 times a day (almost 200 times in just over two months) in the thread that sends e-mail notices. This is an ASP.NET 2.0 web site written in C#. To improve reliability and response, outgoing e-mails are placed in the database, and the actual sending is do...more >>

How to find screen resolution (DPI) ?
Posted by Tom at 5/7/2006 11:32:18 AM
Is there some place to find out what the display screen resolution is in dots per inch? So far the only way that is close is to look at SystemInformation::CaptionHeight and compare the size of the caption in pixels at different screen resolutions and use that to estimate the display r...more >>

Attribute called by compiler during compilation to modify compiler output?
Posted by Stuart Carnie at 5/4/2006 12:48:57 PM
I suspect it's unlikely, but you'll never know until you ask, but are there any attributes that would allow us to contribute to the compiled output? e.g. // this class exists in a separate, compiled assembly for the compiler to load during compilation class MyMethodCompiler : Attribute { ...more >>

FailFast and MiniDump creation
Posted by Chris Mullins at 5/3/2006 10:06:23 PM
I'm looking into adding automated mini-dump creation to my companies .NET software products. For the past few years, we've been using ADPlus scripts (thank you BugSlayer!) to setup and catch 2nd Chance Exceptions, generating .NET 1.1 dumps, and then using WinDbg and Son of Strike to track d...more >>

CodeDom : How do I initialize this array?
Posted by Russell Mangel at 5/3/2006 2:27:11 PM
I am using C# CLR 2.0 CodeDom: I need to create the following array: SqlParameter[]sqlParameters={ new SqlParameter("@invID", SqlDbType.Int, 4, "invID"), new SqlParameter("@imaID", SqlDbType.Int, 4, "imaID"), new SqlParameter("@qtret", SqlDbType.Float, 8, "qtret")}; Would it be possibl...more >>

CodeDom : CLR 2.0 Question
Posted by Russell Mangel at 5/3/2006 10:28:46 AM
I am using C# 2.0 and the CodeDom. Can someone answer the following 3 questions about the CodeDom in CLR 2.0. 1. I understand that there is no while() loop, only for( ; ; ) loop, can anyone confirm this. 2. I understand that there is no switch() statement, can anyone confirm this. 3. I n...more >>

Reflection on Interfaces and inherited members
Posted by Niall at 5/3/2006 4:13:02 AM
I'm having some troubles with unit tests that use mocks of interface types. I'm mocking an interface type that inherits some members. The mock framework attempts to verify the method I'm trying to mock is on the type it's mocking and fails. The framework is not using any binding flags to ident...more >>

Contains method doesn't work on BindingList<T>
Posted by Hiten at 5/2/2006 7:54:01 PM
Hi, I have a BindingList<T> collection and I am adding concrete object T in to the binding list. Before adding them, I want to verify if object with same data exist in the collection. When I use Binding list’s Contain method to check if object exist in the collection, it always returns fa...more >>

typeof(Byte[]).GetInterfaceMap
Posted by Ben Voigt at 5/2/2006 6:26:16 PM
I thought GetInterfaceMap should work for every interface returned by GetInterfaces()... but here I have a counterexample. Has anyone seen this before? Here's a unit test for Zanebug (substitute your favorite test runner): using Adapdev.UnitTest; [TestFixture] class GetInterfaceMap {...more >>

Working with Multiple CPUs
Posted by vzaffiro at 5/2/2006 1:59:01 PM
I am trying to find additional information on how the CLR works with multiple CPUs in .net 2.0 framework. Is it enabled by default? Can I spawn multiple appDomains on specific CPUs or does it only relate to multithreading? ...more >>

Application running in Framework 2.0 ?
Posted by SenthilVel at 5/2/2006 12:00:00 AM
Hi All I have my application built with Framework1.1. 1. Will my application work in a machine where only 2.0 is present ? 2. what are the steps i must do in order to make my 1.1 application work with 2.0 ??? Thanks Senthil ...more >>

Internet Explorer Ignoring supportedRuntime Directive
Posted by Jediah L at 5/1/2006 3:50:34 PM
I have an html application that uses an embeded .Net user control - and has specified the startup attribute for supportedRuntime for 1.1.4322 - inside of a XML configuration file. When I run this application it ignores the runtime directive and loads up the 2.0 runtime - I have verified thi...more >>


DevelopmentNow Blog