Re: Casting of derived classes
- From: "Joanna Carter \(TeamB\)" <joannac@xxxxxxxxxxxxxxx>
- Date: Mon, 11 Apr 2005 10:33:27 +0100
"Georg Fleischer" <GeorgFleischer@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de news: 6CB564BF-7A50-4BC7-9CAE-325E89CCD22C@xxxxxxxxxxxxxxxx
> This newsgroup-post describes exactly what I want to do, but doesn't help
> me, because in my case the described base class "vehicle" is "UserControl"
in
> "System.Web.UI" Namespace. I have no chance of implementing a copy
contructor
> to the UserControl class.
>
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet
..languages.csharp&mid=0cc2e888-5066-425b-a172-5399ef07740c
>
> That leeds me to the point of despartion. If anybody has an idea, how to
> solve this problem, please write.
I asked you why you wanted to access private members of UserControl in your
copying routine. What is your answer ?
As was mentioned in the MSDN thread, what you are trying to do is based on
unsound design and until you can justify what you are trying to achieve in
more detail, it is very difficult for anyone to give you an answer that
makes any sense.
The idea of using ICloneable in a derived class also means that you would
have to write a list of assignments of protected or public properties; that
is what cloning is all about, you don't have a choice.
Joanna
--
Joanna Carter
Consultant Software Engineer
.
- References:
- Casting of derived classes
- From: Georg Fleischer
- Re: Casting of derived classes
- From: Jon Skeet [C# MVP]
- Re: Casting of derived classes
- From: Georg Fleischer
- Re: Casting of derived classes
- From: Daniel Jin
- Re: Casting of derived classes
- From: Georg Fleischer
- Re: Casting of derived classes
- From: Joanna Carter \(TeamB\)
- Re: Casting of derived classes
- From: Georg Fleischer
- Re: Casting of derived classes
- From: Joanna Carter \(TeamB\)
- Re: Casting of derived classes
- From: Georg Fleischer
- Re: Casting of derived classes
- From: Joanna Carter \(TeamB\)
- Re: Casting of derived classes
- From: Georg Fleischer
- Casting of derived classes
- Prev by Date: convert int[] to byte[]
- Next by Date: Re: Are arguments passed to a function contained in an array object?
- Previous by thread: Re: Casting of derived classes
- Next by thread: Re: Casting of derived classes
- Index(es):