HighTechTalks DotNet Forums  

RE: How to clone a derivated class of ArrayList

Dotnet VJSharp microsoft.public.dotnet.vjsharp


Discuss RE: How to clone a derivated class of ArrayList in the Dotnet VJSharp forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default RE: How to clone a derivated class of ArrayList - 10-22-2003 , 05:54 PM






I used the following code, it compiled and ran cleanly:

package ConsoleApplication1;

import java.util.ArrayList;
import java.lang.Cloneable;

public class MyClass1 extends ArrayList implements Cloneable
{
public MyClass1()
{
//
// TODO: Add Constructor Logic here
//
}

public Object clone()
{
MyClass1 obj = (MyClass1) super.clone();
return obj;
}
}


package ConsoleApplication1;

import ConsoleApplication1.MyClass1;

/**
* Summary description for Class1.
*/
public class Class1
{
public Class1()
{
//
// TODO: Add Constructor Logic here
//
}

/** @attribute System.STAThread() */
public static void main(String[] args)
{
MyClass1 c1 = new MyClass1();
MyClass1 c2 = (MyClass1) c1.clone();
}
}


Thanks,

Michael Green
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.


Reply With Quote
  #2  
Old   
 
Posts: n/a

Default RE: How to clone a derivated class of ArrayList - 10-27-2003 , 10:42 AM






Yes, I'm running under Microsoft Windows XP Professionel
Version 2002. 5.1.2600 Nu2600

Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .NET Framework 1.1 Version 1.1.4322


Quote:
-----Original Message-----
I will have our lab set up a machine to try to reproduce
this error. Are
you running under the French version of Windows XP as
well as Visual
Studio.Net 2003?


Thanks,

Michael Green
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and
confers no rights.
Please reply to newsgroups only.

.


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default RE: How to clone a derivated class of ArrayList - 10-27-2003 , 07:49 PM



Excellent. I will have our lab set it up and I'll get back to you as soon
as I can.

Thanks,

Michael Green
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.


Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default RE: How to clone a derivated class of ArrayList - 10-29-2003 , 07:03 PM



I am able to reproduce the problem and I have submitted a bug report to the
development team.

Thanks,

Michael Green
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.