MONO Malfunctions?
来源:互联网 发布:php文件上传错误代码 编辑:程序博客网 时间:2024/05/21 10:21
Here is a piece of code I wrote that fails in running when compiled by MONO. I checked it carefully according to the language specification I have known, and couldn't find any explanation for the failure. I didn't believe it is the final result, and turned to VS to have a try. The program unsurprisingly passed with intended result. And therefore the code is what can distinguish MONO and VS (of the version I am using). The only problem here is whether this distinction is a critical misinterpretation of the language on MONO's side or it's just that I'm using the language feature in an too unconventional and excessive way.
(The following is a simplified test program that can properly demonstrate the problem, Mar.27,2009)
The result by VisualStudio:
: Test 0
: item A generated
: Test 1
: item A generated
请按任意键继续. . .
The result of the program compiled by MONO:
: Test 0
Error:
System.TypeLoadException: “QTest.MonoGenericTest+GEnumerator1`1[T]”上的 Generi
cArguments[0] (“T”)与类型参数“T”的约束冲突。
在 QTest.MonoGenericTest.GEnumerator1`1.<IEnumerable.GetEnumerator>c__Iterato
r0.MoveNext()
在 QTest.MonoGenericTest.Main(String[] args)
: Test 1
: item A generated
As the exception indicates, the MONO runtime framework regards the type parameter passed into GEnumerator (A in this case) from as conflicting with the type constraint (specified by the clause initated with the 'where' keyword). I suspect there is some deficiencies in MONO's runtime type management (as different to C++, C#'s generic types are generally expanded at runtime, this is definitely the reason why there's no error message given out by the compiler)
- MONO Malfunctions?
- Mono
- Mono
- mono
- Mono
- Mono
- Mono
- MONO
- mono:Hello Mono!
- Mono案例--Hello Mono
- mono:Qt#
- Mono下载
- 安装mono
- 接触Mono
- Mono介绍
- 安装Mono
- MoNo安装
- Mono BitSharp
- php connect mysql
- Linux命令之find
- 关于java继承和多态的问题
- 对jsf的一点疑问
- oracle 8080端口问题
- MONO Malfunctions?
- 表格自动增加删除行
- 3.函数指针及结构体建表学习
- 写个自己的调试器
- 动态地显示统计图表--横式
- 取得datalist中所选取的项目的id值
- php smarty变量的修饰
- 根据服务器的时间自动调整本机时间
- 还是把感觉记下来好些