• <tfoot id='68oZS'></tfoot>
  • <legend id='68oZS'><style id='68oZS'><dir id='68oZS'><q id='68oZS'></q></dir></style></legend>
    <i id='68oZS'><tr id='68oZS'><dt id='68oZS'><q id='68oZS'><span id='68oZS'><b id='68oZS'><form id='68oZS'><ins id='68oZS'></ins><ul id='68oZS'></ul><sub id='68oZS'></sub></form><legend id='68oZS'></legend><bdo id='68oZS'><pre id='68oZS'><center id='68oZS'></center></pre></bdo></b><th id='68oZS'></th></span></q></dt></tr></i><div id='68oZS'><tfoot id='68oZS'></tfoot><dl id='68oZS'><fieldset id='68oZS'></fieldset></dl></div>

    1. <small id='68oZS'></small><noframes id='68oZS'>

          <bdo id='68oZS'></bdo><ul id='68oZS'></ul>

        C# 4.0 编译器崩溃

        C# 4.0 Compiler Crash(C# 4.0 编译器崩溃)

          <tfoot id='2v9pO'></tfoot>
            <tbody id='2v9pO'></tbody>

          1. <legend id='2v9pO'><style id='2v9pO'><dir id='2v9pO'><q id='2v9pO'></q></dir></style></legend>
              1. <small id='2v9pO'></small><noframes id='2v9pO'>

                <i id='2v9pO'><tr id='2v9pO'><dt id='2v9pO'><q id='2v9pO'><span id='2v9pO'><b id='2v9pO'><form id='2v9pO'><ins id='2v9pO'></ins><ul id='2v9pO'></ul><sub id='2v9pO'></sub></form><legend id='2v9pO'></legend><bdo id='2v9pO'><pre id='2v9pO'><center id='2v9pO'></center></pre></bdo></b><th id='2v9pO'></th></span></q></dt></tr></i><div id='2v9pO'><tfoot id='2v9pO'></tfoot><dl id='2v9pO'><fieldset id='2v9pO'></fieldset></dl></div>
                • <bdo id='2v9pO'></bdo><ul id='2v9pO'></ul>
                  本文介绍了C# 4.0 编译器崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  此代码示例无法编译.有什么解决办法吗?

                  使用系统;使用 System.Collections.Generic;使用 System.Linq;使用 System.Text;命名空间 ConsoleApplication1{使用教堂 = Func<动态、动态、动态>;课堂节目{静态无效主要(字符串 [] 参数){教会真 = (a, b) =>一个;教堂假=(a,b)=>乙;Func<教堂,教堂,教堂>并且 = (x, y) =>x(y(真,假),假);}}}

                  <块引用>

                  错误 6 内部编译器错误(地址 5476A4CC 处的 0xc0000005):可能的罪魁祸首是EMITIL".编译器发生内部错误.要解决此问题,请尝试在下列位置附近简化或更改程序.列表顶部的位置更接近发生内部错误的点.可以使用/errorreport 选项将此类错误报告给 Microsoft.测试应用

                  解决方案

                  我使用VS2010(WinXP 64)重现了崩溃.

                  两种解决方法:

                  1.不要使用 using 别名

                  以下代码在 VS2010 上编译干净:

                  使用系统;使用 System.Collections.Generic;使用 System.Linq;使用 System.Text;命名空间 ConsoleApplication1{课堂节目{静态无效主要(字符串 [] 参数){函数<动态、动态、动态>真 = (a, b) =>一个;函数<动态、动态、动态>错误 = (a, b) =>乙;Func,函数<动态,动态,动态>,函数<动态、动态、动态>>和= (x, y) =>x(y(真,假),假);}}}

                  2.使用 Mono 编译器

                  Mono 2.10 编译器 (dmcs) 没有问题.

                  [单声道]/tmp @ dmcs test.cstest.cs(18,42): 警告 CS0219: 分配了变量And",但从未使用过它的值编译成功 - 1 个警告[单声道]/tmp @ ./test.exe[单声道]/tmp @

                  这是在 linux 上测试的.

                  1. 您可以在 Windows .NET 上运行使用 mono 创建的二进制文件.
                  2. Mono 编译器附带安装程序 MSI,也可以在 Windows 上运行.

                  This code sample is not able to be compiled. Any work arounds out there?

                  using System;
                  using System.Collections.Generic;
                  using System.Linq;
                  using System.Text;
                  
                  namespace ConsoleApplication1
                  {
                      using church = Func<dynamic, dynamic, dynamic>;
                  
                      class Program
                      {
                          static void Main(string[] args)
                          {
                              church True = (a, b) => a;
                              church False = (a, b) => b;
                  
                              Func<church, church, church> And = (x, y) => x(y(True, False), False);
                          }
                      }
                  }
                  

                  Error 6 Internal Compiler Error (0xc0000005 at address 5476A4CC): likely culprit is 'EMITIL'. An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to the point at which the internal error occurred. Errors such as this can be reported to Microsoft by using the /errorreport option. TestApplication

                  解决方案

                  I reproduced the crash using VS2010 (WinXP 64).

                  Two workarounds:

                  1. don't use the using alias

                  The following code compiles cleanly on VS2010:

                  using System;
                  using System.Collections.Generic;
                  using System.Linq;
                  using System.Text;
                  
                  namespace ConsoleApplication1
                  {
                      class Program
                      {
                          static void Main(string[] args)
                          {
                              Func<dynamic, dynamic, dynamic> True = (a, b) => a;
                              Func<dynamic, dynamic, dynamic> False = (a, b) => b;
                  
                              Func<Func<dynamic, dynamic, dynamic>, 
                                   Func<dynamic, dynamic, dynamic>,
                                   Func<dynamic, dynamic, dynamic> > And 
                                  = (x, y) => x(y(True, False), False);
                          }
                      }
                  }
                  

                  2. use the Mono compiler

                  No problem with Mono 2.10 compiler (dmcs).

                  [mono] /tmp @ dmcs test.cs
                  test.cs(18,42): warning CS0219: The variable `And' is assigned but its value is never used
                  Compilation succeeded - 1 warning(s)
                  [mono] /tmp @ ./test.exe 
                  [mono] /tmp @ 
                  

                  This was tested on linux.

                  1. You can run binaries created with mono on Windows .NET.
                  2. Mono compiler comes with an installer MSI and runs on Windows as well.

                  这篇关于C# 4.0 编译器崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean(强制 JsonConvert.SerializeXmlNode 将节点值序列化为整数或布尔值)
                  Using JSON to Serialize/Deserialize TimeSpan(使用 JSON 序列化/反序列化 TimeSpan)
                  Could not determine JSON object type for type quot;Classquot;(无法确定类型“Class的 JSON 对象类型.)
                  How to deserialize a JSONP response (preferably with JsonTextReader and not a string)?(如何反序列化 JSONP 响应(最好使用 JsonTextReader 而不是字符串)?)
                  how to de-serialize JSON data in which Timestamp it-self contains fields?(如何反序列化时间戳本身包含字段的JSON数据?)
                  JSON.Net custom contract serialization and Collections(JSON.Net 自定义合约序列化和集合)
                  <tfoot id='1ss5e'></tfoot>

                  • <small id='1ss5e'></small><noframes id='1ss5e'>

                    <legend id='1ss5e'><style id='1ss5e'><dir id='1ss5e'><q id='1ss5e'></q></dir></style></legend>

                        <bdo id='1ss5e'></bdo><ul id='1ss5e'></ul>
                        • <i id='1ss5e'><tr id='1ss5e'><dt id='1ss5e'><q id='1ss5e'><span id='1ss5e'><b id='1ss5e'><form id='1ss5e'><ins id='1ss5e'></ins><ul id='1ss5e'></ul><sub id='1ss5e'></sub></form><legend id='1ss5e'></legend><bdo id='1ss5e'><pre id='1ss5e'><center id='1ss5e'></center></pre></bdo></b><th id='1ss5e'></th></span></q></dt></tr></i><div id='1ss5e'><tfoot id='1ss5e'></tfoot><dl id='1ss5e'><fieldset id='1ss5e'></fieldset></dl></div>

                            <tbody id='1ss5e'></tbody>