I have a routine
public void SomeRoutine(List<IFormattable> list) { ... }
I then try to call this routine
List<Guid>list = new List<Guid>();
list.Add(Guid.NewGuid());
SomeRoutine(list);
And it fails with a compile-time error. System.Guid implements IFormattable, but the error I get is
cannot convert from
'System.Collections....
When we call any method that's outside the machine boundaries ( remote methods ) , how does the CLR know this and then serialize ( or make copies of ) actual objects and not the memory addresses ( references to the actual objects ) to send when any method is called crossing the machine boundaries ?
This question came to my mind realizin...
We recently implemented some symmetric keys in MS SQL 2005 for encrypting and decrypting credit card, check routing/account numbers.
Ideally, we would like a user defined function to be able to perform the encryption and decryption, however, its not possible since the encryptbykey and decryptbykey functions cannot be used within user de...
For an application I am writing, I want to have extreme extensibility and extension methods seem to give me what I want, plus the ability to call them without an instance, which I need too.
I remember reading that static methods are faster than instance methods but don't get the advantages of GC. Is this correct?
It's highly unlikely I...
I've just run NGen on an .exe assembly, to install, and it says all is up to date, but there is no Native Assembly folder in the GAC, nor is there any Native Assembly service. What's up?
...
What is the difference between IronPython and BOO? Is there a need for 2 Python-like languages?
...
What is the difference between the JIT compiler and CLR? If you compile your code to il and CLR runs that code then what is the JIT doing? How has JIT compilation changed with the addition of generics to the CLR?
...
The .NET TimeZoneInfo class is great and I thought it would answer all my issues with recording data from multiple time zones in my SQL 2005 database.
To convert a UTC datetime in the database to any other time zone i'd just get the time zone into a TimeZoneInfo class using TimeZoneInfo.FindSystemTimeZoneById() and then call the TimeZon...
If you are passing an interface or an instance of a class as a parameter, are we passing many objects or the full vtable, because once you call a method on the instance it need to recurse the vtable and call the appropriate one right?
How does this work?
...
Hi!
I've been playing with PostSharp a bit and I ran into a nasty problem.
Following IL in Silverlight assembly:
.method public hidebysig specialname newslot virtual final instance void
set_AccountProfileModifiedAt(valuetype [mscorlib]System.DateTime 'value') cil managed
{
.maxstack 2
.locals (
[0] bool ~propertyHasCh...
I read here (and elsewhere) that it's possible, in SQL Server 2008, to build a user-defined aggregate which can return a string longer than 8000 characters. This is exactly what I need.
Supposedly, the method is to set maxByteSize to -1 instead of a number btw 1 and 8000; this should allow any size up to 2GB.
For some reason, apparent...
Seems like NUMA is promising for parallel programming, and if I am not wrong the current latest cpus have built-in support for it, like the i7.
Do you anticipate the CLR to adapt NUMA soon?
EDIT: By this I mean having support for it, and taking advantage of it.
...
Let's say I have a .NET user application (.exe) running under Windows that was compiled in .NET Framework Version 3.0 (VS2008). If that application loads another .NET Assembly (.dll) that was compiled on a different computer using .NET Framework Version 2.0 (VS2005), will the loaded assembly use the existing 3.0 runtime (which will run ...
What unusual, unexpected consequences have occurred in terms of performance, memory, etc when switching from running your .NET applications under the 64 bit JIT vs. the 32 bit JIT? I'm interested in the good, but more interested in the surprisingly bad issues people have run into.
I am in the process of writing a new .NET application w...
A String is a reference type even though it has most of the characteristics of a value type such as being immutable and having == overloaded to compare the text rather than making sure they reference the same object.
Why isn't string just a value type then?
...
My co-worker said that in a previous interview, he learned that foreach is faster in VB.Net than c#'s foreach. He was told that this was because both have different CLR implementation.
Coming from a C++ perspective, I'm curious on why this is and I was told that I need to read up on CLR first. Googling foreach and CLR doesn't help me un...
I have a class library assembly and some test code. Because the test code needs to peek at the internals of the the class, it needs to be part of the assembly and because I don't want to have it run all by it's self, it needs have something public so that a different assembly can invoke it. This ends up tacking on some code that shouldn'...
The TimeZoneInfo class has a Host Protection Attribute of MayLeakOnAbort.
This seems to prevent me accessing it from the SQL Server CLR. But is there a workaround?
...
Does C# inline access to properties? I'm aware of the 32 byte(instruction?) limit on the JIT for inlining, but will it inline properties or just pure method calls?
...
This is more out of curiosity that a real requirement, but I'm wondering if it's possible to treat JavaScript as (ideally) a first-class .NET citizen, or (secondarily) have some way of invoking/interpreting pure JavaScript functions (that don't require the DOM) in a desktop setting?
Has anyone ever attempted implementing a CLR version o...