[Mono-list] Difference in generic IList from .NET

Francisco Figueiredo Jr. fxjrlists at yahoo.com.br
Thu Jan 17 14:16:05 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A S wrote:
| I'm new to mono, and trying to get my existing .NET application to
run.  I'm having a problem with a difference in the behavior of generic
lists.  Please can someone help me out?  Am I being stupid?  Or should I
raise a bug?
|
| In Mono, if a writable list is accessed as an IList, it appears to be
treated as readonly.  Here is a minimal program that works fine under .NET:
|
| using System;
| using System.Collections.Generic;
|
| namespace MonoTest
| {
|   class Program
|   {
|     static void Main(string[] args)
|     {
|       IList<int> lList = new int[2];
|       lList[0] = 1;
|     }
|   }
| }
|

Hi, Adam!

What mono version are you using?

I'm using mono 1.2.6 and your program doesn't throw any exception.


Maybe you are using some previous Mono version which had this bug and it
was already fixed in 1.2.6

I hope it helps.


Regards,

Francisco Figueiredo Jr.
http://fxjr.blogspot.com
Npgsql Lead Developer
http://pgfoundry.org/projects/npgsql
Mono Project Contributor
http://www.go-mono.com
MonoBrasil Project Founder Member
http://monobrasil.softwarelivre.org


- --
~ - Would you tell me, please, which way I ought to go from here?
~ - That depends a good deal on where you want to get to.
~ 		-- Lewis Carroll "Alice's Adventures in Wonderland"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBR4+pdf7iFmsNzeXfAQIkwQf/XxcbH7DjeykLTzPBrBppaLIxryODtVxB
0B1EVYOu8zxt1jaZbyjM0rirPDUWB+eZCDxm3qzuhCSCVnq7VSmrnU0FOU92um3e
UT0p1gPv3keqx/yHRDnQ74CO86hdflDwdoGg5tl0Vc/icB7hgYzq/AbmQSEGWDcu
GBCAugJNJfd8woSdSqKZipqokh59FhMXRNu+L+hnebs31/CGKQH9CY7Q/dFLBfCl
WXMPucRzizU5gfApauEhtzhcXi2Ja30Rbqyp+qQClqVZFgXEWSsylQsMX27KYJKX
0gzFTMANAhWpfMc33ccTjZzIfJ6JK+Bubfy8Jx5rissEdz4mtpDwSA==
=lDP0
-----END PGP SIGNATURE-----


More information about the Mono-list mailing list