Say we have a class with 10000 const string members.
class Schema
{
//Average string length is 20
public const string ID1 = "some.constant.value";
public const string ID2 = "some.other.constant.value";
//...
}
Not all fields are referenced in the rest of the code. Only 10% of them is accessed on startup - their reference is as...
More and more I realized that without jumping into the code details, I cannot really understand the how CLR works.
So could you recommend some good books on SSCLI (Shared Source CLI)?
Many thanks.
...
Hello everybody
I am sure that codes will produce same result but CLR will consider unused namespace directives while allocating memory ? Another question can be that CLR consider unused code blocks while allocating memory ?
...
I have a Windows Forms application (.NET 4) that runs fine on my development machine but crashes on two other test machines. I can load the minidump that it creates in VS2010.
Choosing to "Debug with Mixed" leads to apparently endless (I killed devenv after about 20 minutes) abuse of the CPU by Visual Studio.
When I "Debug with Native ...
And if so, why can't you do this:
public interface IParsable
{
static IParsable Parse(string s);
static bool TryParse(string s, out IParsable);
}
in C#?
EDIT: Or, alternatively:
public interface IParseable<T>
{
static T Parse(string s);
static bool TryParse(string s, out T);
}
EDIT #2:
I have learned the folly of m...
I want to embed iron ruby into a mud that I am creating and for some reason I'm having trouble finding the correct examples to get started.
All I want to do is create a game where 'you' the player will program bots in iron ruby and then I will interperet the code in c# and make the bots do what you want them to. Also, I want to make it...
Hi,
I'm new to this. I'm writing a clr stored procedure that calls another stored procedure to get a value that's used in a calculation.
A stored procedure returns int (I guess SqlInt32? the type of the value in the table is int) that is then needed to be converted to decimal.
Here's the code I have:
public static int CalculateMyV...
Hi,
I have an managed c# application that uses expression encoder 4 SDK, and thus requires .NET 4 and hence VS2010. I wish to startup and stop this application as an in process DLL.
This article and demo on code project proved a very useful proof of principle
http://www.codeproject.com/KB/mcpp/ijw_unmanaged.aspx
The included demo wo...
"Consider a typical Windows x86 or
AMD64 architecture, the memory is
divided in executable sections that
cannot be written to and data sections
that can be written to but cannot be
executed (think DEP)."
"JIT compiles methods in-memory, does
(generally) not store anything to
disk, instead moves it around where
the...
I execute the following code via CLR, is there a reason why the message is not printed to the SQL Server, does it need to wait until the Stored Procedure returns all the rows (there is about 7 Billion rows to return)
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedu...
I keep getting this error when trying to perform a delete in the middle of my DataReader:
System.InvalidOperationException: The context connection is already in use.
I get all the rows that need to be deleted and then iterate through the data reader as there are a lot of rows returned.
SqlConnection conn = new SqlConnection("context c...
Possible Duplicate:
CLR and CLI - What is the difference?
What is the difference between CLR and CLI? (in .NET)
...
Are there any aggregated guides to writing libraries which need to be Silverlight-compatible?
Or is the standard procedure to just build, look for errors, fix, repeat?
Obviously I recognize the answer may depend on what version of Silverlight is being targeted, but I'd expect any answer to just specify version if the solution is specif...
Hey guys,
I thought about writing a language for the sake of writing a language, and now that I'm done with the parser and the AST, I have to do something about the library. Specifically, basic types.
I'm going to use a very basic intermediate representation before I pass that down to LLVM and get native code that way. Though, since my...
Consider a process, in which multiple Application domains are created. Can we share a single static field across these Application domains or can we pass this static field across these application domains? How does CLR handle this?
...
Inside an application Domain "AD1", try to crate another Application domain "AD2" (Like nested application domain). Is this possible?
e.g. When we create an process, that process will run in default application domain. In this process, if we create an new Application domain named "AD1", is this "AD1" is created inside default application...
so I have such code in my VS ffmpeg video encoder project in C++ which compies perfectly under CLR (inttypes.h part of ffmpeg's includes)
// ISO C9x compliant inttypes.h for Miscrosoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
// Redistribution...
So I want to see a wary simple class (like Class1) with 1 or 2 functions in lib used by C++ main app in one sln. A tutorial or zip... please help.
...
Is this a limitation of the CLR or are there compatibility concerns with existing code?
Is this related to the messed up variance of delegate combining in C# 4.0?
Edit:
Would it be possible to have a language using co-/contravariance without that limitation running on the CLR?
...
Are there any IL opcodes that are new in .NET 4.0 as compared to 3.5, and if so, where can I find a list of them?
...