clr

How does Parrot compare to other virtual machines?

时间秒杀一切 提交于 2019-12-02 18:01:33
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? Schwern The following answer was written in 2009. See also this 2015 update by raiph . To expand on @Reed and point out some highlights, Parrot's opcodes are at a far higher level than most virtual machines. For example, while most machines store integers and floats, the basic registers are integers, numbers, strings and Parrot Magic Cookies (PMCs). Just

Have you ever used ngen.exe?

扶醉桌前 提交于 2019-12-02 17:24:40
Has anybody here ever used ngen? Where? why? Was there any performance improvement? when and where does it make sense to use it? Yes, I've seen performance improvements. My measurements indicated that it did improve startup performance if I also put my assemblies into the GAC since my assemblies are all strong named. If your assemblies are strong named, NGen won't make any difference without using the GAC. The reason for this is that if you have strong named assemblies that are not in the GAC, then the .NET runtime validates that your strong named assembly hasn't been tampered with by loading

How is it that an enum derives from System.Enum and is an integer at the same time?

烈酒焚心 提交于 2019-12-02 17:16:06
Edit : Comments at bottom. Also, this . Here's what's kind of confusing me. My understanding is that if I have an enum like this... enum Animal { Dog, Cat } ...what I've essentially done is defined a value type called Animal with two defined values, Dog and Cat . This type derives from the reference type System.Enum (something which value types can't normally do—at least not in C#—but which is permitted in this case), and has a facility for casting back and forth to/from int values. If the way I just described the enum type above were true, then I would expect the following code to throw an

Mixing .NET 3.5 with 4/4.5 assemblies in the same process

孤人 提交于 2019-12-02 16:45:37
I'd like to migrate a .NET 3.5 WinForms based application to the latest .NET version (4.5). The application uses "external" components (can be thought of as plugins) that are also currently .NET 3.5 based. I'd like to know what runtime/core libraries are used in case we convert ONLY THE APPLICATION to compile using .NET 4.5? Should this scenario properly work? (loading .NET 3.5 assemblies in a 4.5 process)? * The plugin assemblies are loaded via reflection. How does the CLR runtime handle such a scenario? is this a safe practice? If you recompiled the main EXE of your app to target .NET 4.x or

.NET vs ASP.NET vs CLR vs ASP

天涯浪子 提交于 2019-12-02 14:12:05
Although I know the terms I used to forget the differences sometimes...So just to maintain a place for reference...Thanks all for your answers. SLaks ASP , Active Server Pages (now referred to as ASP Classic) is a server-side scripting environment that predates .Net and has nothing to do with it ASP pages are usually written in VBScript, but can be written in any language supported by the Windows Scripting Host - JScript and VBScript are supported natively, with third-party libraries offering support for PerlScript and other dynamic languages. .Net is a framework for managed code and

Making your .NET language step correctly in the debugger

谁都会走 提交于 2019-12-02 14:05:25
Firstly, I apologize for the length of this question. I am the author of IronScheme . Recently I have been working hard on emitting decent debug info, so that I can use the 'native' .NET debugger. While this has been partly successful, I am running into some teething problems. The first problem is related to stepping. Due to Scheme being an expression language, everything tends to be wrapped in parenthesis, unlike the major .NET languages which seems to be statement (or line) based. The original code (Scheme) looks like: (define (baz x) (cond [(null? x) x] [(pair? x) (car x)] [else (assertion

Surprising CLR / JIT? behaviour - deferred initialization of a local variable

ぃ、小莉子 提交于 2019-12-02 11:48:48
问题 I have just encountered something quite bizarre running an app in Debug mode ( VS 2008 Express , Any Cpu ). I would appreciate if someone enlightened me as to what is happening here? // PredefinedSizeGroupMappings is null here Dictionary<string, int> groupIDs = PredefinedSizeGroupMappings ?? new Dictionary<string, int>(); // so groupIDs is now initialized as an empty Dictionary<string, int>, as expected // now: PredefinedSizesMappings is null here - therefore I expect sizeIds // to be

what are 'EdmFunctions' for?

感情迁移 提交于 2019-12-02 09:57:15
i saw the System.Data.Common.CommandTrees.ExpressionBuilder.EdmFunctions static class accidently, that contains a set of extension methods on System.Data.Common.CommandTrees.DbExpression , like AddDays, Concat,.... which bring back System.Data.Common.CommandTrees.DbFunctionExpression as return type, this static methods if needs to an argument, they only accept a System.Data.Common.CommandTrees.DbExpression type, in addition i look over the System.Data.Common.CommandTrees.DbExpression and i saw this class is abstract and by its static members you can create a System.Data.Common.CommandTrees

Linking to static lib with managed components

只愿长相守 提交于 2019-12-02 05:45:15
问题 After creating a GUI for my personal little application, I am trying to compile it as a static library to use in another project. The GUI is created and has other tasks performed with it through a managed public ref class that currently only has 5 functions, but will be added to. This is my header file in the static library that would be included in the other project (well, at least a new one with only the public functions, all the extra stuff would be removed); #ifndef GUIInterface_H #define

Read/Get TypeRef table from assembly metadata

删除回忆录丶 提交于 2019-12-02 05:29:41
问题 This is a follow-up question to THIS one: To analyze an assembly (or the types it ueses) I would like to read the TypeRef table of such assembly. I got the hint to use Mono.Cecil to do this, but I only found examples reading TypeDef information. Also browsing the source-code of cecil I only found internal classes which seems to me are responsible for reading the metadata, but I found no "public interface". I also found THIS article which uses some COM-library to read metadata, but I couldn't