I have the following c# code
static void Main(string[] args)
{
List<Results> votes = new List<Results>();
}
public struct Results
{
public int Vote1;
public int Vote2;
public int Vote3;
public Candidate precinctCandidate;
};
public class Candidate
{
public Candidate()
...
There's a program written entirely in C# that targets .NET Framework 2.0.
Is there a way I could somehow compile (translate) managed EXE to a native one so it could be .NET-agnostic? I know there are probably commercial products for that purpose... but they are a bit expensive.
The problem is that we are to deploy the program on compute...
Is it possible to build custom mscorlib.dll without any use of native code (pinvoke allowed :-)?
I've tried a little experiment this weekend to see how hard it would be to do it and had following problems:
I've added one class System.Static to my version of mscorlib but had TypeLoadException with message that it can't load type 'Syste...
I have a C# project consisting of stored procedures that reference a win32 dll from another project in the solution. Currently, dllimport is using absolute paths to reference it. If I use a relative path instead, where is that path relative to once the clr stored procs assembly is loaded in sql server?
...
I'm fiddling with a project where the CLR is hosted within a C application. Is there a supported way to unlink the CLR and relaunch it?
...
Im running into a problem where the tool im using for development (a simulator tool) keeps throwing OutofMemoryException's, I know its not my app, because no matter what project im running, it happens.
The only fix I have for it so far is to restart my PC, is there a way to flush/clear the CLR runtime so I dont have to restart my PC eac...
Is it possible to clone an object, when it's known to be a boxed ValueType, without writing type specific clone code?
Some code for reference
List<ValueType> values = new List<ValueType> {3, DateTime.Now, 23.4M};
DuplicateLastItem(values);
The partical issue I have is with a value stack based virtual instruction machine. (And Im too ...
Is anyone aware of if/when this will actually be released as hard/soft back? A draft can be downloaded from Ted Newards blog but I can't seem to find anything relating to a release date.
...
Parrot is the virtual machine originally designed for Perl 6.
What technical capabilities does the Parrot VM offer that competing virtual machines such as the Java Virtual Machine (JVM)/Hotspot VM and Common Language Runtime (CLR) lack?
...
By default structs in C# are implemented with [StructLayout( LayoutKind.Sequential )] for reasons basically stating that these type of objects are commonly used for COM Interop and their fields must stay in the order they were defined. Classes have LayoutKind.Auto defined.
My question is should I explicitly state my structs as [StructLa...
Due to the overhead of calling the garbage collector in the CLR, is it more efficient to leave it, or force to garbage collection when objects go out of scope?
...
How can I get the current CLR Runtime version in a running .NET program ?
...
I just finished debugging a problem, where our program crashed on a production server, but never on development machines.
I have made this small program, which I could reproduce the issue with:
using System;
using System.Collections.Generic;
using System.Linq;
namespace RunTimeBug
{
class Program
{
static void Main(st...
I'm a bit rusty, actually really rusty with my C++. Haven't touched it since Freshman year of college so it's been a while.
Anyway, I'm doing the reverse of what most people do. Calling C# code from C++. I've done some research online and it seems like I need to create some managed C++ to form a bridge. Use __declspec(dllexport) and...
I'm wanting to learn more about IL and CLR / DLR under the hood. A friend of mine recommended the book "Inside Microsoft .NET IL Assembler", but since it came out in 2002 I fear it's pretty out of date at this point.
Does anyone have any more up-to-date books or websites that can be used by someone who understands .NET languages to lea...
If so, that would imply that the blocked thread can enter when another thread calls Monitor.Wait(obj). This seems a little odd to me in that it must contend with other threads in the ready queue.
If not, can it only un-block when Monitor.Exit(obj) is called? Or is it in obj's waiting queue?
This isn't clearly documented in the MSDN Lib...
Why cannot C# generics derive from one of the generic type parameters like they can in C++ templates? I mean I know it impossible because CLR does not support this, but why?
I am aware of the profound differences between C++ templates and C# generics - the former are compile time entities and must be resolved during the compilation, whi...
Is the execution time (run-time) performance of code in a class that is loaded via reflection identical to the same code when the class is created using the new keyword?
I say yes. But I was discussing this with a colleague who believes that the reflection oriented code is always slower.
My view is that regardless of how the class wa...
As the title says, what are the compiler, CLR or CPU optimizations to be aware of when working with threads and non-blocking synchronization?
I have read a little about the reordering of instructions to improve efficiency that could break things, and caching optimizations that will result in variables not being visible to other threads ...
I've been searching this on net, but could not find one in layman's language. Can anyone help me out?
...