Questions tagged [clr]

The Common Language Runtime (CLR) is a core component of Microsoft's .NET initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. In the CLR, code is expressed in a form of bytecode called the Common Intermediate Language (CIL, previously known as MSIL—Microsoft Intermediate Language).

Developers using the CLR write code in a language such as C# or VB.NET. At compile time, a .NET compiler converts such code into CIL code. At runtime, the CLR's just-in-time compiler converts the CIL code into code native to the operating system. Alternatively, the CIL code can be compiled to native code in a separate step prior to runtime by using the Native Image Generator (NGEN). This speeds up all later runs of the software as the CIL-to-native compilation is no longer necessary.

Although some other implementations of the Common Language Infrastructure run on non-Windows operating systems, Microsoft's .NET Framework implementation runs only on Microsoft Windows operating systems.

Books

Articles

3930 questions
2
votes
1 answer

Reflection in SQL Server 2008?

I want to know, is there any reflection support in SQL Server 2008, like as c# support reflection. Basically I am curious about how SQL Server implements all our (where, orderby, exists) clauses. How it would implement all these in behind the…
Ravi Gadag
  • 15,735
  • 5
  • 57
  • 83
2
votes
4 answers

What are the types in C# that the syntax depends on?

Possible Duplicate: Which parts of C# .NET framework are actually parts of the language? I know it uses System.Type like in typeof(foo) System.Attribute because you can use [Foo] instead of [FooAttribute] System.String because you can write…
Sonia
  • 1,044
  • 2
  • 13
  • 22
2
votes
1 answer

When Is MethodBase.GetCurrentMethod Reliable / Predictable?

A method could get inlined; there is an attribute to prevent that ("there's an att for that"). However, apparently a method may also not get its own stack frame on x64 due to tail-call optimization by the JITter…
2
votes
4 answers

VS2008 - Adding Letters To Version Number (i.e. 1.1.1.12-Dev)

My supervison, coming from a non-.net background wants me to use his special version numbering scheme as major.minor.revision.build[-Dev|RC1|RC2]. He wants to be able to right-click on the dll and see the version number like this or retrieve the…
irtheman
  • 43
  • 1
  • 7
2
votes
7 answers

In techie-speech, why cant you run a 64bit application on a 32bit OS?

I need some help to describe, in technical words, why a 64-bit application prompts a "Not a valid Win32 application" in Windows 32-bit on a 32-bit machine? Any MSDN reference is greatly appreciate it (I couldn't google a reliable source). I know it…
user106599
2
votes
1 answer

WINFORM C++ Managed string->unmanaged string produces unexpected results when combined with fstream

Right. So I'm trying to do this: String^ ai = textBox4->Text; char* towrite = (char*) Marshal::StringToHGlobalAnsi(ai ).ToPointer(); Marshal::FreeHGlobal(IntPtr(towrite)); string write = string(towrite); ofstream…
Caps
  • 79
  • 6
2
votes
1 answer

Error settings breakpoints but only on some lines while debugging

This line is causing the "key not found" in the PostEntityImages collection. Entity pimage = _context.PostEntityImages["postcreate"]; When I put a break point on that line and put it in the watch window it works fine and that key is…
user1231231412
  • 1,659
  • 2
  • 26
  • 42
2
votes
3 answers

Writing a SQLServer User Defined Function in C#

I'm struggling to find much information on this subject so I'm wondering if any of you can enlighten me. I basically have a mini application written in C# which accepts a string, performs a few manipulations to it and then returns the result. I now…
Rich
  • 121
  • 1
  • 2
  • 10
2
votes
1 answer

SQL CLR, HttpWebRequest, and Connection Throttling

Good day! I have inherited a fairly complex MSSQL database. Used within the code are CLR Assembly DLLs that are called from within stored procedures. Within these CLR Assembly DLLs, we are reaching out to a 3rd party web service via the .Net 2.0…
2
votes
4 answers

What is the life expectency of structs when returned from method and passed as parameters?

I'll try to make a little more sense of this question with an example: I have a struct: struct RefStruct { public object token; public object item; } and i have a method the returns that struct: RefStruct createItem() {... } Let's assume…
Amit Bens
  • 1,315
  • 3
  • 12
  • 20
2
votes
1 answer

Will this application tree be garbage collected?

In my app composition root a large instance tree is built where parent nodes can be implicitly referenced by child nodes through for instance delegates and observers. This is a simplified view of the managed objects' relationships: A <---+ B …
Johann Gerell
  • 24,991
  • 10
  • 72
  • 122
2
votes
1 answer

Can you use environment variables to replace hardcoded path for href attribute in codebase element

I was curious if CLR could load assemblies from a specific location and this is what I found which basically loads the assembly from C:\MyAssemblies folder. Now, my question is - Is it possible to use environment variables in the following href…
Kabir
  • 91
  • 1
  • 1
  • 7
2
votes
5 answers

CodeRush suggests making a method static if it has parameters, agree or disagree?

I use Developer Express's CodeRush product which has a feature called Code Issues which makes suggestions to optimize your code. I've noticed that if you have a method that has parameters it will always suggest making this method static. In the…
Neal
  • 9,487
  • 15
  • 58
  • 101
2
votes
4 answers

VC2008, how to turn CLR flag off for individual files in C++/CLI project

This post says that it is possible to turn off the CLR flag for an individual .cpp file. From the post: You can set /CLR on or off in each .cpp file individually. Turn it on for the whole project,. as you have done, then turn it off for the…
Rob
  • 25,984
  • 32
  • 109
  • 155
2
votes
1 answer

SQL CLR - table variable or temp table vs. collection

I am building up a dataset from SQL server - a stored procedure that returns a dataset. It takes several passes to manipulate the data how I need it. I did this previously in a T-SQL stored proc, but it is getting too complex, so I am moving to SQL…
user210757
  • 6,996
  • 17
  • 66
  • 115