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 > april 2006

copying stream - advise needed
Posted by SharpCoderMP at 4/25/2006 12:24:41 PM
hi, Iv'e seen two ways of copying streams in .net: Stream outStream = MemoryStream(); Stream inStream = CreateSomeMemoryStream(); byte[] buffer = new byte[inStream.Length]; inStream.Read(buffer, 0, buffer.Length); outStream.Write(buffer, 0, buffer.Length); and the second one was more or...more >>

Detecting "this XXX in not supported by this YYY" via reflection?
Posted by Larry Minton at 4/25/2006 12:18:47 PM
Is there a way to tell via reflection whether a class does not support an event/method/property defined in a base class? For example, consider: WebBrowser Events: Event: Click Description: This event is not supported by this control. (Inherited from WebBrowserBase) We are automatically ...more >>

Getting AppSettingsReader to use app.config file changes at runtime
Posted by Matt Adamson at 4/25/2006 12:12:15 PM
Guys, When writing unit tests for our assemblies we'd like to change configuration values at runtime for some tests i.e. to test all code paths are executed. e.g. one method would create a test with a value set to true and the next test method would set it to false. I can set the values in ...more >>

VB.Net evaluates 'if' conditions unnecessarily?
Posted by Tim_Mac at 4/25/2006 10:23:38 AM
hi, in c# i can run the following code without risk of NullReferenceException: if(textNode != null && !String.IsNullOrEmptytextNode.InnerText)) the reason it is safe to run is because if the first condition is false, then the CLR will not bother to examine further conditions (false and any...more >>

Loadfrom different behviour on .net 2.0 versus 1.1
Posted by John H at 4/25/2006 7:43:32 AM
Hi, ..net 1.1 -------------- Assembly called test.dll on c:\ and in gac. call Loadfrom("c:\test.dll") , always loads it from c:\ ..net 2.0 ------------- Assembly called test.dll on c:\ and in gac. call Loadfrom("c:\test.dll") , always loads it from gac Is this different behaviour ...more >>

Reference a Service
Posted by Shawn B. at 4/21/2006 4:15:37 PM
Greetings, Let's say I have a Service running on my machine, that has a full object model of some kind. From an external process, such as a Win application or Console application, I'd like to be able to do something like: MyService ms = MyService.GetInstance(); and return an active ref...more >>

Have a way to load assembly from Memory instead from DLL?
Posted by mtczx232 NO[at]SPAM yahoo.com at 4/21/2006 5:51:22 AM
I have some idea to hide my Assemblies (DLL) in Data file. and when i need them, I read it into Memory. my q is, if have a way to load Assembly from memory? ...more >>

Load an object reference onto the stack ???
Posted by VivekR at 4/20/2006 4:11:25 PM
Hi I have a class CodeGen in which GenerateILBody is a method that uses ILGenerator.Emit to create the IL code as method body for a dynamic method DynMethod. GenerateILBody at runtime must call another method CallBack of the class CodeGen. All i have to do is to emit the IL code that loads ...more >>



Force Rejit of a method
Posted by Dinis Cruz at 4/20/2006 12:21:05 AM
Hello, Is there a way to force the ReJit of a method? One of the demos that I do in my 'Rooting the CLR' presentation is to do real time MSIL patching. The problem is that I need to apply the 'patches' before the JIT has occurred, unless (hence my question) I am able to dynamically either: ...more >>

assemblyBinding redirection to an assembly when the public key tokens are different
Posted by klumsy NO[at]SPAM gmail.com at 4/13/2006 4:30:57 PM
can you redirect in app.config to an assembly when the public tokens are different? ...more >>

problem with namespaces in VB.Net (2.0)
Posted by Tim_Mac at 4/13/2006 6:44:19 AM
hi, i have an aspx page in a web project, which loads a user control dynamically. (by the way i don't have any problems using namespaces in C# web projects, this seems to be just a VB thing). the user control is in a sub-directory, and i cannot refer to the type of the control to access its...more >>

Major memory leak in sos.dll under .NET Framework 2.0
Posted by Andreas Suurkuusk at 4/12/2006 5:27:01 AM
I have tried to use sos.dll together with the WinDbg debug engine to perform some automated retrieval of runtime data. Unfortunately, there seems to be a major memory leak in the version of sos.dll that is shipped with .NET Framework 2.0. Each time an sos command is executed, e.g !DumpDomain, ...more >>

can library compiled 1.0 be used in Application compiled in 2.0
Posted by Baron Ng at 4/12/2006 2:00:02 AM
I have an winform referencing another .net dll: I would like to ask if the following works: 1. Library built in VS.Net 2002, and referenced in a WinForm created in VS.Net 2005 2. Library built in VS.Net 2005, and referenced in a WinForm created in VS.Net 2002 In case I have an applicatio...more >>

Unauthorized Access Exception with tcp_listener.AcceptSocket();
Posted by Arkadius Roczniewski at 4/11/2006 11:50:47 AM
Hello NG, i have a big problem with establishing a network connection between two Windows-forms Applications. The first application(server) has a Tcplistener and the second(client) a Tcpclient. when the client wants to connect to the server, the server-application throws this Exception: ...more >>

Reference type size in heap
Posted by Amir Shitrit at 4/9/2006 10:07:02 AM
Why does a reference type occupies 8 bytes in memory? I assume that 4 bytes are needed to identify the object's type (or for the virtual table), but what about the remaining 4 bytes? Second, why does the size of a structure that has only one byte in it, is rounded to 4?...more >>

Is it possible to run a console function and capture the result.
Posted by Ken at 4/8/2006 3:25:01 PM
I and not sure if this is the correct forum to post this queston. Any ideas will be appreciated. Need to call a base windows console command function (like dir or chkdsk) and capture the results for further processing. Two questions: (1) Is it possible to code a program in C# to do th...more >>

problem with file handles
Posted by SharpCoderMP at 4/4/2006 3:09:29 PM
hi, in my app i monitor the filesystem for changes with FileSystemWatchers. When the change is detected the app performs some actions using Shell32 to obtain information from the filesystem. now the problem is that apparently the CLR not always closes the file handles immediately. this is rat...more >>

setting heap sizes
Posted by Sam at 4/4/2006 2:37:46 PM
In Java you can specify heap using ms mx options. My C# app is chrunring on GC and I was wondering if perhaps presizing the heap would improve performance. However I couldnt find any options for this. Is tehre a way to do this in machine.config or app.config ? =sam...more >>

How to examine objects on Gen 2 heap?
Posted by Stu Carter at 4/4/2006 2:20:50 PM
Hi, ENV: .Net 1.1, VS 2003, Windows Server 2003 SP1 We are seeing some issues with the Gen 2 heap unexpectledly increasing over a lengthy period in an ASP.Net application. To troubleshoot this we've been using the 1.1 CLR profiler, this shows allocations, but I am unable to find out whi...more >>

CLR version mismatch
Posted by PRASENJIT BURMAN at 4/1/2006 5:52:23 AM
I have a managed application compiled on .net 1.1 calling a unmanaged ACtive X control which in turn uses a managed extension C++ COM dll compiled on . Net 2.0. This causes the following exception to be generated in the managed app System.IO.FileLoadException Common Language Runtime Inter...more >>


DevelopmentNow Blog