all groups > dotnet clr > march 2006
Filter by week: 1 2 3 4 5
Constant unification - what's the best approach?
Posted by Ole Nielsby at 3/31/2006 10:02:24 PM
I need a mechanism for unifying constant objects.
Sort of like a generalization of String.Intern.
The constants can be nested (think pure Lisp or
immutable DOM).
I need a kind of weak-reference dictionary, so that
garbage constants will automatically be removed.
At present, the best id... more >>
Is there an ordering of objects?
Posted by Ole Nielsby at 3/31/2006 8:25:11 PM
When gc-able objects are created, this happens at
increasing (or decreasing) addresses.
Is the ordering of these addresses guaranteed to stay the same?
Or can an object be moved past another during compacting,
as a result of pinning or gc optimization techniques?
A scenario might look like:... more >>
"invalid handle", sockets, threads and garbage collector
Posted by Jan Waga at 3/31/2006 7:03:50 AM
Hello,
I'm working on two bugs in my app. They seemed unrelated at first glance,
but after some testing and searching the web for clues I am now sure they
are somehow connected. The two pieces of code execute frequently, at regular
intervals (this is a monitoring app) and sometimes - just s... more >>
as operator
Posted by Jiho Han at 3/30/2006 5:11:44 PM
I am not sure if this is the right group but I didn't see languages group.
I have the following statement:
if (e.SourceRow["COL1"] as string != e.TargetRow["COL2"] as string)
{
// do something
}
The COL1 and COL2 are both double type. e.SourceRow is System.Data.DataRow
and the ind... more >>
Locating thread locking issues
Posted by Sam at 3/30/2006 12:38:16 PM
I have a multi threaded app that seems to have a thread locking issue.
Are there any tutorials and tools that describe how to go about tracking
this ? I looked at the CLR profiler but that seems to be focussed more
on the heap and memory usage.
Any pointers ?
=sam... more >>
Confusing networking exception
Posted by Jeffery Jones at 3/30/2006 9:48:38 AM
Given - .NET 2.0, App 1 creates a TCP listening socket on 127.0.0.1
App 2 connects to the same socket on 127.0.0.1.
All works fine until the app is installed on another machine without
Visual Studio. Then the connecting client gets -
---- UnauthorizedAccessException ---------
Mess... more >>
Unexpected behavior - getting exception - Underlying connection cl
Posted by Rahul Anand at 3/27/2006 9:09:01 PM
As per our requirements we have a web service which internally connects
(Simple HTTP Post Request) to a remote server to initiate some work. We are
calling the web service method asynchronously from a .NET Web Application
hosted on IIS. In our setup the web request form a client can be running... more >>
Stack overflow calling from generic method to non-generic method.
Posted by Ed Chapel at 3/27/2006 5:05:01 PM
In the following code (over-simplified, of course), the generic method calls
itself recursively, quickly resulting in a StackOverflowException:
public T[] GetArray<T>( T value )
{
return GetArray( value );
}
public Array GetArray( object value )
{
return return new ArrayList().ToArray... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Converting Text To Hex
Posted by Shaftoe at 3/20/2006 8:46:22 AM
I am working on a project where they want to append to a file but the data
has to be in HEX. I am getting the result from a SQL query and I want to buld
a string for the new record. but again the output is expected to be in a HEX
format with a record length of 64 bytes.
Any thoughts?... more >>
Loading System.Web assembly from ASP.NET
Posted by Adam Tibi at 3/18/2006 11:47:44 PM
Hi,
I am using ASP.NET 2.0, I need to obtain a reference to
System.Web.Security.CookieProtectionHelper . To do that, I need to load
System.Web.dll. However, this library is already executing and if some how I
can obtain a reference to this library then it might save me a bit of
performanc... more >>
Check for a DomainSetup?
Posted by erickvch at 3/18/2006 11:04:57 PM
I'm using a managed Custom Action hosting the CLR from a c++ dll using wix .
That works great except when I need to use the Custom Action more than once
cause in that case it crashes. After some debuging I found that the error
raises when I call the method CreateDomainSetup(&pDomainSetupPunk) fr... more >>
Size of Array in bytes
Posted by source at 3/17/2006 1:15:18 AM
Is there a way to find the size of the entire array in .NET
I tried using Marshal.SizeOf() but apprently it gives me an
ArgumentException if I use a value type.
So if I have an array;
int[] arr = new int[] {1,2,3,4};
can I get the size of the array in bytes?
source
... more >>
Using Appdomains on the client
Posted by John Grant at 3/16/2006 5:48:05 PM
I was thinking of using appdomains and loading a winform assembly in each
one. This would be a client application. Creating an appdomain seams
lighter than a process and I can share data between appdomains. Any reason
why I shouldn’t? Any examples? I can create an appdomain and execute ... more >>
Finding Processor
Posted by source at 3/16/2006 11:41:55 AM
Is there a way I can find what CPU family my application is running on?
I am trying to find if the processor is a 64bit or 32bit.
Is there an API exposed in the framework?
Any help will be helpful.
thank you,
source
... more >>
CLR "fatal execution engine error" messages in event log
Posted by Lucvdv at 3/16/2006 12:00:00 AM
Do these messages in the event log look familiar to anyone?
Could they be caused by calling Thread.Abort() on a System.Threading.Thread
without giving it time to clean up?
They are generated when a service written in .Net 2005 is stopped.
Nothing abnormal seems to happen as long as the ser... more >>
DotNet wants references that I'm not using
Posted by Michael Brooks at 3/15/2006 1:25:30 PM
I'm using dotNet V1.1, C# .
I create a class library as follows:
using System;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace ClassLibrary1
{
public class Class1
{
public Class1()
{
}
public static void SetVar(ref System.Web.UI.WebControls.TextBo... more >>
which version clr will IE host by default?
Posted by Richard Lee at 3/15/2006 10:27:29 AM
If IE load an assembly, I am wondering which version of clr IE will host?
if we have both 1.1 and 2.0 at client side.
Thanks... more >>
need help on text files
Posted by AVL at 3/15/2006 4:46:28 AM
Hi,
I need some info on text and xml files......
How many users can simultaneously read a text or xml file...
I've a web appliaction which needs to access a text file and a xml file..
The current users of the system are around 1000 people...
Can 500 amongst them read those files simul... more >>
CLR 2.0
Posted by preport at 3/14/2006 6:50:59 PM
I have a dll that I wrote in Visual Studio 2005 and would like to add it to
one of our older apps (CLR 1.1).
Can I do it? The machine has the .NET Framework 2.0 installed and the dll
doesn't do anything special. It doesn't utilize Generics or anything..
Just a lot of business logic code I do... more >>
statical link
Posted by Ilya Dyoshin at 3/11/2006 12:00:00 AM
Hi all!
Is there a possibility to statically link used .NET components into my
programm... (to enable it runs on machines that do not have .NET Framework)
Like static link of MFC libraries..
Thanks in advance.
... more >>
Single source code to compile over .NET 1.0, 1.1, 2.0 and CF
Posted by Vipul Pathak at 3/10/2006 7:40:09 PM
Hi everyone,
I have a .NET 1.1 application ready to be ported on .NET 2.0.
With some of the features made obsolete in 2.0 and the new recomended
methods are not available in .NET 1.1, It leaved me with a question in mind:
How come I conditionally compile my application with .NET 1.1 and 2.... more >>
Compress Files
Posted by Amelyan at 3/7/2006 11:30:29 AM
I have a bunch of files I need to put into Compressed (zipped) Folder,
MyFiles.zip file, similarly to what Windows XP does when you send files to
compressed zipped folder. What is the simplest way to compress these files
into a .zip?
I found System.IO.Compression, but I am not sure how to ... more >>
Can CLR 1.1 and CLR 2.0 run in the same app?
Posted by Brian R. at 3/6/2006 5:19:27 PM
Is it possible to run two versions of the CLR in the same application? The
framework of our application was developed in 2003 under CLR 1.1 and some of
our plugins were developed in VS 2005 and need the 2.0. The 2003 components
experience problems when running with the 2.0 CLR only.
I hav... more >>
Using Reflection to Get Inherited types
Posted by source at 3/6/2006 11:08:37 AM
I am tyring to get inhertied members of a type using relfection, but i am
not able to do it.
What bindingflags do I need to use to get inhertied members.
Any pointers will help
source
... more >>
Why does compiler emit NOP instructions?
Posted by Peter Rilling at 3/4/2006 10:11:42 PM
Hi.
Not too long I had to use Reflection.Emit to dynamically generate some
classes that were only to be dynamically generated based on runtime
conditions.
Before emitting the op codes, I created a class and compiled it, then
reviewed the op codes using Reflector.
Well, I noticed the c... more >>
polymorphism
Posted by Michał Januszczyk at 3/3/2006 1:16:27 AM
is there any way to make Animal.Foo() being called ??
//==============================
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Animal z = new Mouse();
z.DoSth();
}
}
class An... more >>
Event handlers and memory usage
Posted by 6tc1 NO[at]SPAM qlink.queensu.ca at 3/2/2006 1:33:34 PM
Hi all, I'm inquiring about the mechanism that is used to implement
event handlers in .NET (not really relevant, but I'm using C#).
Anyway, I've noticed that I can pass an object in an event argument and
if the receiver (event handler) of that event changes any of the
properties in that object, ... more >>
Is it bad to throw the exception caught, un-alterered?
Posted by NB at 3/2/2006 5:21:36 AM
Hi all,
This thing came up while discussing on the practices for Exception
Handling. One of my freinds has strong feeling to not to do soomething
like:
try
{
// try something
}
catch (Exception ex)
{
throw(ex);
}
I was told that catching and throwing the same exception is B... more >>
|