[Mono-list] Modifying Base Class of Mono

Ivan Hawkes blackhawk@ivanhawkes.com
Tue, 29 Jul 2003 16:46:20 +0100


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

apwilson@rogers.com wrote:

| Hello:
| I wasn't sure if this email was appropriate for the question I have,
if not if anyone could direct me to where I should ask a question about
mono that would be great.
|
| How can I modify one of the base classes of the C# environment and use
the modifications when using mono to execute a C# program?
|
| I am a graduate student doing some research into C#.  I am trying to
add some functionality to the ArrayList class under System.Collections.
  Originally, I was using the Microsoft Shared Source.  I would modify
the source code for the ArrayList class and rebuild everything and then
I could use whatever I have added to the ArrayList collection in a C#
program.
| I have since moved to a Linux system and switched to Mono as it is
much faster than the MS shared source.
| So I guess the question is: where is (or is there) the source code for
the C# base classes located in the mono source code, and what would I
have to do to use any changes I make to that source code?
|
| Any help or information any of you could provide me with would be much
appreciated.
|
| Sincerely,
| Andrew P. Wilson
| University of Toronto

Are you not able to achieve the results you want through inheritence? I
would have thought it safer to inherit from that class and add any extra
features you need than to re-implement and change the base class. I once
went down the path of reworking library code for my own means (in this
case, putting drop shadows on a text windowing library) and it meant I
had to re-do the work every time a new release of the library came out.
Not a pretty sight as I did this for the third time.

Anyway, hack the code if that's what floats your boat, but also consider
the OO methods of doing things if they are indeed available (I'm
assuming this isn't a sealed class).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBPyaWy/r1e7bH1pzBAQLcKw/+JMFEFcqf+k/lTgcp7Eds185DV5Or2In4
cr167ScNN/d2RIciJqdfBg2n3ogzHKRqP55dQ6niVkh3F09golGtAqfKBb9rxE+7
Y2lPGJojuHdeEJsoFsG36xOznbKojmwW/6R4DWE4d51AmIOTY0m79a2Id4h/Xoj+
KlpJNR38CjwGDy8/B9cYIJ6gZcEbmEO3oKb2NQIyu3pwUi2F5BOFLunNqv/wfA+E
2Um8TxihuoRjsFsTDtdY+8URTqko9ArPo01X5uiE13+AdB8paKYMLvHNZCU3qU4p
Waqjd0ZPIKanp1+I5pA13XzDAll4Lpt5DNWPVkEApLuo0xPgIym9gSL9GjGb9hzH
FJWETzUTEnXhGUQbuzhz2/KSL19PLkPIQ7PcOtB8tvwINMK831NpebXMm7+g0oPv
R4HJrKbNbPWtLEtxMlJJQCQaigv30gqSlMTevN+zbcvICIDJ8FMFhd+x7DcyP4hr
gou5WUGxiQA+bdXYsBAN0bp4Co5WVHr9jH0eW3AoBKf8RRWXTtHxDRRyZJcbluzf
gBeW9RvnAYNpEFbefG+KMbd/TDdqlUt674/gi14oaK8nFRaOPwFMkr5DQJHcEI+1
jnVXQ+LcEJKRZBtJiJ1xh5Vn/iMaU4gbrxu1wRkGmHYuWE+MUaOphPqCM+exIFGN
rArMv8716mI=
=hrpX
-----END PGP SIGNATURE-----


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________