Try the following:
using System;
class T
{
static T() { Console.WriteLine("static constructor"); }
}
class Test
{
static void Main()
{
Type t = typeof(T);
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(t.Typ
eHandle);
}
}
Regards,
Jeroen
> -Original Mess
Hi John,
The Windows XP loader does understand the .NET PE format (at least it
can recognize them and hand them over to mscoree.dll). If you run
http://www.frijters.net/test.exe on Windows XP, it'll print out "hello",
if you run it on Windows 2000 it does not (it causes an exception, but
this isn
John,
It is suggested that you use Thread.GetHashCode() for this. See
http://discuss.develop.com/archives/wa.exe?A2=ind0011B&L=DOTNET&P=R52378
(watch for url wrap!)
Regards,
Jeroen
> -Original Message-
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of John Lam
> Sent:
You can overload both != and == differently. This is required to
implement ternary logic.
Check out the following:
public class Test
{
public static void Main(string[] args)
{
Test t1 = new Test();
Test t2 = new Test();
System.Consol
Cristian Diaconu wrote:
> I'm trying to understand the possible reasons why filters
> have been added to .NET.
I guess it boils down to three issues (for me).
1) Is the performance difference between two-pass and one-pass relevant?
I would argue it isn't. Exception handling is expensive. Programm
Can you post a compiling snippet, because I cannot reproduce the
behaviour you see.
The following compiles just fine:
using System;
using System.Data;
public class Test
{
public static void Main(string[] args)
{
}
public static Test Method()
{