473,326 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Why seal a class

I want to inherit from Bitmap to add a property but I can't because it's
sealed. Is there any reason to seal a class?

Thanks,
Michael
Jul 21 '06 #1
32 9390

Michael C schreef:
I want to inherit from Bitmap to add a property but I can't because it's
sealed. Is there any reason to seal a class?

Thanks,
Michael
The main purpose of a sealed class is to take away the inheritance
feature so the user can not derive a class from that particular class.
In this way you can seal the boundaries of your application. Normally
it is done with static classes. Structs are always sealed.

The only thing i can think of in this case is that the Microsoft
programmers didn't want any derivation because the Bitmap class
implements the members declared in the Image class. Perhaps that
overriding them could cause problems in other classes.

I hope that this answer gives you all the information that you want.

Jul 21 '06 #2
Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Michael C" <no****@nospam.comwrote in message
news:en*************@TK2MSFTNGP05.phx.gbl...
>I want to inherit from Bitmap to add a property but I can't because it's
sealed. Is there any reason to seal a class?

Thanks,
Michael

Jul 21 '06 #3
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.uswrote
in message news:OK**************@TK2MSFTNGP05.phx.gbl...
Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.
It's a pity, I just want to add some fairly harmless properties like a Tag
property so I can pass some extra info around with the bitmap. It seams to
me that if inheriting the bitmap could cause problems if certain method are
overridden isn't really that big a deal. We can cause all sorts of problems
using the api but we still get to go that :-)

Michael
Jul 21 '06 #4
There are other way rather than inheritance, for example you can use
aggregation -realizing you own custom Bitmap class and using it everywhere

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Michael C" wrote:
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.uswrote
in message news:OK**************@TK2MSFTNGP05.phx.gbl...
Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like a Tag
property so I can pass some extra info around with the bitmap. It seams to
me that if inheriting the bitmap could cause problems if certain method are
overridden isn't really that big a deal. We can cause all sorts of problems
using the api but we still get to go that :-)

Michael
Jul 21 '06 #5
"Michael C" <no****@nospam.comwrote in
news:el**************@TK2MSFTNGP05.phx.gbl:
It's a pity, I just want to add some fairly harmless properties like a
Tag property so I can pass some extra info around with the bitmap. It
seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can
cause all sorts of problems using the api but we still get to go that
While I agree with you in principle and in practice, I can offer the
(obvious?) suggestion to write a class that has a Bitmap as a member, plus
whatever other properties you want to pass around. Then use an instance of
that class in place of Bitmap, and reference the bitmap member when you
want to use the bitmap itself.

-mdb
Jul 21 '06 #6
"Michael Bray" <mbray@makeDIntoDot_ctiusaDcomwrote in message
news:Xn**************************@207.46.248.16...
While I agree with you in principle and in practice, I can offer the
(obvious?) suggestion to write a class that has a Bitmap as a member, plus
whatever other properties you want to pass around. Then use an instance
of
that class in place of Bitmap, and reference the bitmap member when you
want to use the bitmap itself.
That makes sense and is possibly a better solution. What I'm doing is faking
16 bit grayscale bitmaps by using two 8 bit bitmaps as the high and low
order bits. I was hoping to make the low order bitmap a property of the high
order bitmap so that I can can have functions that accept a bitmap as a
parameter check for the low order bitmap.

Michael
Jul 21 '06 #7
Hi Michael,

In .NET 3.0 (shipping with Windows Vista, so I've heard) there are Extender
methods so you can decorate instances of any object or interface with your
own methods and their implementations.

I just thought you might find that interesting. You can download the LINQ
preview for VS.NET 2005 and play around with the up-and-coming functionality
yourself.

I wish it was available for production already 'cause I could sure use LINQ
now.

http://msdn.microsoft.com/data/ref/linq/

- Dave Sexton

"Michael C" <no****@nospam.comwrote in message
news:el****************@TK2MSFTNGP05.phx.gbl...
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...
>Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like a Tag
property so I can pass some extra info around with the bitmap. It seams to
me that if inheriting the bitmap could cause problems if certain method
are overridden isn't really that big a deal. We can cause all sorts of
problems using the api but we still get to go that :-)

Michael

Jul 21 '06 #8
Michael C wrote:
I want to inherit from Bitmap to add a property but I can't because it's
sealed. Is there any reason to seal a class?
Supporting the possibility of inheritance--in a published interface
like the .NET Framework--is a lot of work. You have to design your
class's public and protected members with inheritance in mind, ensuring
that anyone inheriting from the class can insert functionality at
useful points, and ensuring that it's reasonably hard to do stupid
things and jackpot one's self while inheriting.

As well, usually, you expose more about the internal workings of your
class and therefore make it more difficult to change in the future,
because the class's contract with the "public" (which now includes
public users and protected inheritors) is stronger.

An example of a badly designed class that supports inheritance is
PrintPreviewDialog, which allows inheritance but has almost every
behaviour / appearance element you could possibly want to modify in a
child class secured as "private". Some writers prefer to simply seal
the class rather than release nonsense like this.

Jul 21 '06 #9
Hello Dave,

Take into account that .NET 3.0 is just .NET 2.0 + WinFX, there is no .net
3.0 framework at all.

..net 3.0 is just marketing and nothing else

DSIn .NET 3.0 (shipping with Windows Vista, so I've heard) there are
DSExtender methods so you can decorate instances of any object or
DSinterface with your own methods and their implementations.
DS>
DSI just thought you might find that interesting. You can download
DSthe LINQ preview for VS.NET 2005 and play around with the
DSup-and-coming functionality yourself.
DS>
DSI wish it was available for production already 'cause I could sure
DSuse LINQ now.
DS>
DShttp://msdn.microsoft.com/data/ref/linq/
DS>
DS- Dave Sexton
DS>
DS"Michael C" <no****@nospam.comwrote in message
DSnews:el****************@TK2MSFTNGP05.phx.gbl...
DS>
>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.
It's a pity, I just want to add some fairly harmless properties like
a Tag property so I can pass some extra info around with the bitmap.
It seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can
cause all sorts of problems using the api but we still get to go that
:-)

Michael
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Jul 21 '06 #10
Hi Michael,

Well, I'm indifferent to the name and how Microsoft markets their products.
It provides functionality that will be useful to me and I suspect that it
will be useful to Michael C as well.

- Dave Sexton

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello Dave,

Take into account that .NET 3.0 is just .NET 2.0 + WinFX, there is no .net
3.0 framework at all.

.net 3.0 is just marketing and nothing else

DSIn .NET 3.0 (shipping with Windows Vista, so I've heard) there are
DSExtender methods so you can decorate instances of any object or
DSinterface with your own methods and their implementations.
DSDSI just thought you might find that interesting. You can download
DSthe LINQ preview for VS.NET 2005 and play around with the
DSup-and-coming functionality yourself.
DSDSI wish it was available for production already 'cause I could sure
DSuse LINQ now.
DSDShttp://msdn.microsoft.com/data/ref/linq/
DSDS- Dave Sexton
DSDS"Michael C" <no****@nospam.comwrote in message
DSnews:el****************@TK2MSFTNGP05.phx.gbl...
DS>
>>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...

Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like
a Tag property so I can pass some extra info around with the bitmap.
It seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can
cause all sorts of problems using the api but we still get to go that
:-)

Michael
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche

Jul 21 '06 #11
It is important to remember that this is not actually putting the methods
onto the original instance but are simply sugar ..

What actually ends up happenning is the equivalent of

static MyMethod(MyObject _Target)

the compiler will then generate calls passing the original instance to your
static method. If you were to actually inspect the object you have not
actually added a method to it.

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi Michael,

In .NET 3.0 (shipping with Windows Vista, so I've heard) there are
Extender methods so you can decorate instances of any object or interface
with your own methods and their implementations.

I just thought you might find that interesting. You can download the LINQ
preview for VS.NET 2005 and play around with the up-and-coming
functionality yourself.

I wish it was available for production already 'cause I could sure use
LINQ now.

http://msdn.microsoft.com/data/ref/linq/

- Dave Sexton

"Michael C" <no****@nospam.comwrote in message
news:el****************@TK2MSFTNGP05.phx.gbl...
>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like a
Tag property so I can pass some extra info around with the bitmap. It
seams to me that if inheriting the bitmap could cause problems if certain
method are overridden isn't really that big a deal. We can cause all
sorts of problems using the api but we still get to go that :-)

Michael


Jul 21 '06 #12
Hi Greg,

Understood. I'm simply suggesting a means for handling Michael C's problem
in the future without requiring refactoring of all uses of the Bitmap class
to another class.

I played around with the LINQ preview and found this particular feature to
be, potentially, very useful.

- Dave Sexton

"Greg Young" <dr*******************@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP02.phx.gbl...
It is important to remember that this is not actually putting the methods
onto the original instance but are simply sugar ..

What actually ends up happenning is the equivalent of

static MyMethod(MyObject _Target)

the compiler will then generate calls passing the original instance to
your static method. If you were to actually inspect the object you have
not actually added a method to it.

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Hi Michael,

In .NET 3.0 (shipping with Windows Vista, so I've heard) there are
Extender methods so you can decorate instances of any object or interface
with your own methods and their implementations.

I just thought you might find that interesting. You can download the
LINQ preview for VS.NET 2005 and play around with the up-and-coming
functionality yourself.

I wish it was available for production already 'cause I could sure use
LINQ now.

http://msdn.microsoft.com/data/ref/linq/

- Dave Sexton

"Michael C" <no****@nospam.comwrote in message
news:el****************@TK2MSFTNGP05.phx.gbl...
>>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...
Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like a
Tag property so I can pass some extra info around with the bitmap. It
seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can cause
all sorts of problems using the api but we still get to go that :-)

Michael



Jul 21 '06 #13
On Fri, 21 Jul 2006 12:50:47 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>Hi Michael,

In .NET 3.0 (shipping with Windows Vista, so I've heard) there are Extender
methods so you can decorate instances of any object or interface with your
own methods and their implementations.
Nope, that's .NET 3.5 -- or whatever the final name will be.

The .NET 3.0 release that ships with Vista will not contain LINQ etc.,
just the various library packages: WPF, WCF, CS, etc. .NET 3.5 will
be released at a later time.
--
http://www.kynosarges.de
Jul 21 '06 #14
Dave Sexton <dave@jwa[remove.this]online.comwrote:
In .NET 3.0 (shipping with Windows Vista, so I've heard) there are Extender
methods so you can decorate instances of any object or interface with your
own methods and their implementations.
You can add methods, but you can't add any data - so Michael couldn't
really do what he wants, which is to add a Tag property (unless that
could be derived from the existing data).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jul 21 '06 #15
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
Hi Michael,

Well, I'm indifferent to the name and how Microsoft markets their
products. It provides functionality that will be useful to me and I
suspect that it will be useful to Michael C as well.
Sounds like that would be useful. I'm still on 1.1 so maybe can jump 2
versions at once :-)

Michael
Jul 22 '06 #16
Hi Michael,

Yea, I figured you were on 1.1 because the 2.0 Framework has a Tag property
on the Image class, which Bitmap inherits.

For a code snippet that performs exactly what your asking for with the 3.0
C# compiler and extension methods see my response to Jon Skeet's post in
this thread.

- Dave Sexton

"Michael C" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
>Hi Michael,

Well, I'm indifferent to the name and how Microsoft markets their
products. It provides functionality that will be useful to me and I
suspect that it will be useful to Michael C as well.

Sounds like that would be useful. I'm still on 1.1 so maybe can jump 2
versions at once :-)

Michael

Jul 22 '06 #17
Hi Jon,

Actually your statement is incorrect. The following code works fine in the
LINQ Preview, C# 3.0 compiler of May 2006. Also, the docs for the C# 3.0
compiler state that extension properties, events and operators are being
considered. Do you know if they've come to a decision whether to include
those features?

The following code allows any instance of an object, of any Type, to have an
associated object at runtime using SetTag and GetTag methods. I've also
included a non-generic implementation that explicitly extends the Bitmap
class only:

Extensions.cs

using System;
using System.Collections.Generic;
using System.Drawing;

namespace LINQHandsOnLab.Extensions
{
public static class BitmapExtensions
{
private static Dictionary<Bitmap, objectbitmapTags;

public static void SetTag(this Bitmap bitmap, object value)
{
if (bitmapTags == null)
bitmapTags = new Dictionary<Bitmap, object>();

bitmapTags[bitmap] = value;
}

public static object GetTag(this Bitmap bitmap)
{
if (bitmapTags == null)
bitmapTags = new Dictionary<Bitmap, object>();

if (bitmapTags.ContainsKey(bitmap))
return bitmapTags[bitmap];
else
return null;
}
}

/// <summary>Provides <see cref="GetTag" /and
/// <see cref="SetTag" /extension methods to all object instances.
/// </summary>
public static class ObjectTagExtensions
{
private static Dictionary<object, objectobjectTags;

public static void SetTag<T>(this T obj, object value)
{
if (objectTags == null)
objectTags = new Dictionary<object, object>();

objectTags[obj] = value;
}

public static object GetTag<T>(this T obj)
{
if (objectTags == null)
objectTags = new Dictionary<object, object>();

if (objectTags.ContainsKey(obj))
return objectTags[obj];
else
return null;
}
}
}

Test the above with the following Console application:
Program.cs

using System;
using System.Collections.Generic;
using System.Text;

// this using declaration is required so the compiler will resolve the
extension methods
using LINQHandsOnLab.Extensions;

using System.Drawing;
using System.Data;

class Program
{
static void Main()
{
Bitmap bitmap1 = new Bitmap(100, 100);

bitmap1.SetTag(10);

// write 10...
Console.WriteLine("bitmap1 Tag: {0}", bitmap1.GetTag());

Bitmap bitmap2 = new Bitmap(150, 50);

// write a blank line (null reference)...
Console.WriteLine("bitmap2 Tag: {0}", bitmap2.GetTag());

// Create a DataSet and 'tag' the instance with an arbitrary object
DataSet data = new DataSet();

data.SetTag("Custom String Info");

// write "Custom String Info"...
Console.WriteLine("data Tag: {0}", data.GetTag());

Console.ReadLine();
}
}

Output:

bitmap1 Tag: 10
bitmap2 Tag:
data Tag: Custom String Info

- Dave Sexton

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
Dave Sexton <dave@jwa[remove.this]online.comwrote:
>In .NET 3.0 (shipping with Windows Vista, so I've heard) there are
Extender
methods so you can decorate instances of any object or interface with
your
own methods and their implementations.

You can add methods, but you can't add any data - so Michael couldn't
really do what he wants, which is to add a Tag property (unless that
could be derived from the existing data).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Jul 22 '06 #18
Dave Sexton <dave@jwa[remove.this]online.comwrote:
Actually your statement is incorrect.
I don't think so.
The following code works fine in the
LINQ Preview, C# 3.0 compiler of May 2006. Also, the docs for the C# 3.0
compiler state that extension properties, events and operators are being
considered. Do you know if they've come to a decision whether to include
those features?

The following code allows any instance of an object, of any Type, to have an
associated object at runtime using SetTag and GetTag methods.
Yes - and it leaks memory unless you explicitly remove the tag from the
dictionary. The problem is that you're able to add methods and
properties etc, but not *data*. That's why I included the bit in
brackets: "unless that could be derived from the existing data". You're
effectively doing that by using separately stored data, with the
existing data being the reference itself used to look up the tag in the
dictionary.

This is really *not* the same as being able to derive from Bitmap - the
constraints on the caller are much, much bigger.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jul 22 '06 #19
Hi Michael... Some authors have argued that unless a class is
specifically
designed and documented to be safely subclassed it should be sealed
(Joshua
Bloch Effective Java). In the same vein, it has been argued to favor
composition
and forwarding over inheritance (Synder 1986) since inheritance breaks
encapsulation.

A concrete example is a type safe collection. A naive programmer could
extend
from the type safe collection and add non type safe setters.

Regards,
Jeff
>>Is there any reason to seal a class?<<
*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '06 #20
Hi,

Not at all, it has LINQ as well as a bunch of other new features (like the
extenders methods).

In the same vein it's still in alpha state so you will have to wait around a
year at least for that.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello Dave,

Take into account that .NET 3.0 is just .NET 2.0 + WinFX, there is no .net
3.0 framework at all.

.net 3.0 is just marketing and nothing else

DSIn .NET 3.0 (shipping with Windows Vista, so I've heard) there are
DSExtender methods so you can decorate instances of any object or
DSinterface with your own methods and their implementations.
DSDSI just thought you might find that interesting. You can download
DSthe LINQ preview for VS.NET 2005 and play around with the
DSup-and-coming functionality yourself.
DSDSI wish it was available for production already 'cause I could sure
DSuse LINQ now.
DSDShttp://msdn.microsoft.com/data/ref/linq/
DSDS- Dave Sexton
DSDS"Michael C" <no****@nospam.comwrote in message
DSnews:el****************@TK2MSFTNGP05.phx.gbl...
DS>
>>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...

Hi,

It's a design decision , it's an indication that there is no further
inheritance expected for that class.

It's a pity, I just want to add some fairly harmless properties like
a Tag property so I can pass some extra info around with the bitmap.
It seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can
cause all sorts of problems using the api but we still get to go that
:-)

Michael
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche

Jul 24 '06 #21
Hi Ignacio,

I was referring only to using extension methods to 'extend' sealed classes for future use and not an immediate resolution. I'm
sorry if I didn't make that clear enough in my post.

Should have said, at least, ".NET 3.0 will be the answer?"

--
Dave Sexton

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.uswrote in message news:ut**************@TK2MSFTNGP04.phx.gbl...
Hi,

Not at all, it has LINQ as well as a bunch of other new features (like the extenders methods).

In the same vein it's still in alpha state so you will have to wait around a year at least for that.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Michael Nemtsev" <ne*****@msn.comwrote in message news:17***************************@msnews.microsof t.com...
>Hello Dave,

Take into account that .NET 3.0 is just .NET 2.0 + WinFX, there is no .net 3.0 framework at all.

.net 3.0 is just marketing and nothing else

DSIn .NET 3.0 (shipping with Windows Vista, so I've heard) there are
DSExtender methods so you can decorate instances of any object or
DSinterface with your own methods and their implementations.
DSDSI just thought you might find that interesting. You can download
DSthe LINQ preview for VS.NET 2005 and play around with the
DSup-and-coming functionality yourself.
DSDSI wish it was available for production already 'cause I could sure
DSuse LINQ now.
DSDShttp://msdn.microsoft.com/data/ref/linq/
DSDS- Dave Sexton
DSDS"Michael C" <no****@nospam.comwrote in message
DSnews:el****************@TK2MSFTNGP05.phx.gbl. ..
DS>
>>>"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OK**************@TK2MSFTNGP05.phx.gbl...

Hi,
>
It's a design decision , it's an indication that there is no further
inheritance expected for that class.
>
It's a pity, I just want to add some fairly harmless properties like
a Tag property so I can pass some extra info around with the bitmap.
It seams to me that if inheriting the bitmap could cause problems if
certain method are overridden isn't really that big a deal. We can
cause all sorts of problems using the api but we still get to go that
:-)

Michael
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche


Jul 24 '06 #22
On Mon, 24 Jul 2006 11:46:28 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>Should have said, at least, ".NET 3.0 will be the answer?"
Since you appear to have missed my first post in this thread, I'll
repeat myself:

..NET 3.0 will certainly not be the answer because it won't include
LINQ. That technology will be included in .NET 3.5 which will be
released separately, way after Vista and .NET 3.0.
--
http://www.kynosarges.de
Jul 24 '06 #23
Apparently everyone failed to read/acknowledge your post who posted in this thread after you, in your line of reasoning. I read
your post.

I cannot find any public information on .NET 3.5. As of the documentation released in the May 2006 LINQ preview the C# compiler is
referred to as 3.0. Articles all over the page at the following link only refer to the next generation compiler as 3.0:

http://msdn.microsoft.com/data/ref/linq/

A search on MSDN for ".NET 3.0" yields several results but a search for ".NET 3.5" yields no results that backup your statement.

I appreciate any feedback but please forgive me if I don't just go on the word of one person that has no apparent affiliation with
Microsoft and is making a statement that cannot be verified anywhere that I looked on the web. What is your source of information?
How accurate is your statement?

--
Dave Sexton

"Chris Nahr" <ch************@kynosarges.dewrote in message news:gd********************************@4ax.com...
On Mon, 24 Jul 2006 11:46:28 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>>Should have said, at least, ".NET 3.0 will be the answer?"

Since you appear to have missed my first post in this thread, I'll
repeat myself:

.NET 3.0 will certainly not be the answer because it won't include
LINQ. That technology will be included in .NET 3.5 which will be
released separately, way after Vista and .NET 3.0.
--
http://www.kynosarges.de

Jul 24 '06 #24
I must admit that I'm a bit discouraged after reading some of your responses. The topic at hand was not, "How does Microsoft plan
on releasing there next compiler? What will the code-name be? Version number? Is it really just 2.0 with compiler features?" but
instead was, ".NET 3.0 is the answer?". I renamed the title to make it clear that I was trying to bridge the gap from existing
tools to possible uses for next generation tools in the future. I chose the title because it was simple and to inspire people to
think about new applications for the next generation of tools, especially 'Extensions' as they might solve the op's problem with
sealed classes from a different perspective. If you read my first post you'll see that I was really asking, "Could C# extensions be
used to extend a sealed class in a different way than the op had requested?'. I was too vague and will definitely be more precise
with my thread titles in the future.

Aren't we scientists? I tested the tools before making this suggestion. I even posted a code snippet that compiles and does
exactly what I implied. Did anybody try it? Not many people seem to care about the real question at hand. This is frustrating to
me. I can get to the "Interpretation" phase of the scientific process by myself but when it's time for "Verification" I need
community input. I think we should start acting like scientists and share opinions on the technology as it may apply to solve
real-world problems instead of posting tidbits of, IMO, useless information.

I sadly feel like I might be standing alone with this opinion. On this I would like feedback.
--
Dave Sexton

"Chris Nahr" <ch************@kynosarges.dewrote in message news:gd********************************@4ax.com...
On Mon, 24 Jul 2006 11:46:28 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>>Should have said, at least, ".NET 3.0 will be the answer?"

Since you appear to have missed my first post in this thread, I'll
repeat myself:

.NET 3.0 will certainly not be the answer because it won't include
LINQ. That technology will be included in .NET 3.5 which will be
released separately, way after Vista and .NET 3.0.
--
http://www.kynosarges.de

Jul 24 '06 #25
On Mon, 24 Jul 2006 13:01:14 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>Apparently everyone failed to read/acknowledge your post who posted in this thread after you, in your line of reasoning. I read
your post.

I cannot find any public information on .NET 3.5. As of the documentation released in the May 2006 LINQ preview the C# compiler is
referred to as 3.0. Articles all over the page at the following link only refer to the next generation compiler as 3.0:

http://msdn.microsoft.com/data/ref/linq/
That LINQ compiler version was from before the Great Renaming of WinFX
to .NET 3.0. You can find details on various Microsoft weblogs, for
example these entries by Jason Zander:

http://blogs.msdn.com/jasonz/archive...09/624629.aspx
http://blogs.msdn.com/jasonz/archive...13/630066.aspx

Here Jason links to a video where he explains the various versions:

http://blogs.msdn.com/jasonz/archive...19/672052.aspx

And yet more information on Brad Abrams' weblog:

http://blogs.msdn.com/brada/archive/...10/625717.aspx
http://blogs.msdn.com/brada/archive/...11/627128.aspx

That's the original announcement by Somasegar, but I'd rather read the
other entries for more detailed information (also, this one appears to
be down right now):

http://blogs.msdn.com/somasegar/arch...09/624300.aspx
>A search on MSDN for ".NET 3.0" yields several results but a search for ".NET 3.5" yields no results that backup your statement.
You apparently got unlucky with your search. For one thing, using
Google to search Microsoft's website is probably a better idea than
Microsoft's own search function; but even so you wouldn't have much
luck with ".NET 3.5". On the other hand, googling for ".NET 3.0 LINQ"
brings up MS weblogs about the rebranding as the 3rd and 4th hits.
>I appreciate any feedback but please forgive me if I don't just go on the word of one person that has no apparent affiliation with
Microsoft and is making a statement that cannot be verified anywhere that I looked on the web. What is your source of information?
How accurate is your statement?
It's cool that you don't immediately believe someone's say-so but it
would be even better if you asked for a source right away, rather than
acting as if you had not read the post.

The other people perhaps didn't reply to my post because they were
already aware of this widely publicized change of version numbers...
--
http://www.kynosarges.de
Jul 24 '06 #26
Well, and I wasn't trying to pedantically correct some irrelevant
version number but your expectation that this new C# functionality
would ship with Vista, and thus be available as a production release
early next year. That's definitely not going to happen, and that
means not only a delay as such, but also that this C# version won't be
ubiquitous on Vista machines as you might have expected.

That's all I was trying to say, for my part. If you don't care for
widespread public availability anyway, then never mind me.

Also, you might not get much feedback because all LINQ-related issues
have received lots and lots of discussion on this forum already, back
when the whole bag of tricks was first announced.
--
http://www.kynosarges.de
Jul 24 '06 #27
Thanks, I'll have a look at some of those blogs.
It's cool that you don't immediately believe someone's say-so but it
would be even better if you asked for a source right away, rather than
acting as if you had not read the post.
You didn't attempt to address my question, so I didn't respond to your post. The information you provided might be useful or not,
but was off-topic.
The other people perhaps didn't reply to my post because they were
already aware of this widely publicized change of version numbers...
Perhaps next time you should site your information with your post. As for "widely publicized", does Microsoft consider the blogs of
its employees to be there main channel of information to the community? If the main LINQ site on MSDN were to be updated to display
more content about Microsoft's stages of development, such as the current version number of the C# compiler, then I would agree.

Again, thanks for the information but what it boils down to is that the version number of the compiler or when it will actually be
released is an answer to a different question altogether.

--
Dave Sexton

"Chris Nahr" <ch************@kynosarges.dewrote in message news:fr********************************@4ax.com...
On Mon, 24 Jul 2006 13:01:14 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>>Apparently everyone failed to read/acknowledge your post who posted in this thread after you, in your line of reasoning. I read
your post.

I cannot find any public information on .NET 3.5. As of the documentation released in the May 2006 LINQ preview the C# compiler
is
referred to as 3.0. Articles all over the page at the following link only refer to the next generation compiler as 3.0:

http://msdn.microsoft.com/data/ref/linq/

That LINQ compiler version was from before the Great Renaming of WinFX
to .NET 3.0. You can find details on various Microsoft weblogs, for
example these entries by Jason Zander:

http://blogs.msdn.com/jasonz/archive...09/624629.aspx
http://blogs.msdn.com/jasonz/archive...13/630066.aspx

Here Jason links to a video where he explains the various versions:

http://blogs.msdn.com/jasonz/archive...19/672052.aspx

And yet more information on Brad Abrams' weblog:

http://blogs.msdn.com/brada/archive/...10/625717.aspx
http://blogs.msdn.com/brada/archive/...11/627128.aspx

That's the original announcement by Somasegar, but I'd rather read the
other entries for more detailed information (also, this one appears to
be down right now):

http://blogs.msdn.com/somasegar/arch...09/624300.aspx
>>A search on MSDN for ".NET 3.0" yields several results but a search for ".NET 3.5" yields no results that backup your statement.

You apparently got unlucky with your search. For one thing, using
Google to search Microsoft's website is probably a better idea than
Microsoft's own search function; but even so you wouldn't have much
luck with ".NET 3.5". On the other hand, googling for ".NET 3.0 LINQ"
brings up MS weblogs about the rebranding as the 3rd and 4th hits.
>>I appreciate any feedback but please forgive me if I don't just go on the word of one person that has no apparent affiliation with
Microsoft and is making a statement that cannot be verified anywhere that I looked on the web. What is your source of
information?
How accurate is your statement?

It's cool that you don't immediately believe someone's say-so but it
would be even better if you asked for a source right away, rather than
acting as if you had not read the post.

The other people perhaps didn't reply to my post because they were
already aware of this widely publicized change of version numbers...
--
http://www.kynosarges.de

Jul 24 '06 #28
Hi Chris,
Also, you might not get much feedback because all LINQ-related issues
have received lots and lots of discussion on this forum already, back
when the whole bag of tricks was first announced.
I highly doubt that all LINQ-related issues have been discussed. Can you point me to a thread that addresses my particular question
on extension methods related to sealed classes? I'll gladly read it as I've only discussed a single perspective on this issue with
an MVP. Nobody else has taken an interest on debating its aptness.

BTW, in my last post when I asked for feedback I was referring to the trend in this thread and others for people to chime in with
tidbits of information that are irrelevant to the question at hand, which is fine if it's only one or two people and if they have
some other information to add pertaining to the problem. And yes, I don't expect to get any feedback.

I can't help but think that this community makes people feel a bit stand-offish from posting questions that might be considered
'newb' or 'out-of-bounds' with regards to the use of certain technologies and standardized design strategies. This is why you see
so many posts from beginners apologizing for their ignorance. We should all be a bit more open to new ideas and take a more
scientific approach to answering questions and deriving answers and we'll all learn something new from time to time.

--
Dave Sexton

"Chris Nahr" <ch************@kynosarges.dewrote in message news:02********************************@4ax.com...
Well, and I wasn't trying to pedantically correct some irrelevant
version number but your expectation that this new C# functionality
would ship with Vista, and thus be available as a production release
early next year. That's definitely not going to happen, and that
means not only a delay as such, but also that this C# version won't be
ubiquitous on Vista machines as you might have expected.

That's all I was trying to say, for my part. If you don't care for
widespread public availability anyway, then never mind me.

Also, you might not get much feedback because all LINQ-related issues
have received lots and lots of discussion on this forum already, back
when the whole bag of tricks was first announced.
--
http://www.kynosarges.de

Jul 24 '06 #29
On Mon, 24 Jul 2006 13:54:43 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>You didn't attempt to address my question, so I didn't respond to your post. The information you provided might be useful or not,
but was off-topic.
The information directly related to the content of your original post.
>Perhaps next time you should site your information with your post.
Excuse me for occasionally having better things to do than doing other
people's research...
>As for "widely publicized", does Microsoft consider the blogs of
its employees to be there main channel of information to the community?
To the developer community, yes. It's been that way for about two
years at least. As you read the blogs you'll also note that a lot of
discussion is happening right there, in the comments sections.
--
http://www.kynosarges.de
Jul 25 '06 #30
Dave Sexton wrote:
Hi Chris,
Also, you might not get much feedback because all LINQ-related
issues have received lots and lots of discussion on this forum
already, back when the whole bag of tricks was first announced.

I highly doubt that all LINQ-related issues have been discussed. Can
you point me to a thread that addresses my particular question on
extension methods related to sealed classes? I'll gladly read it as
I've only discussed a single perspective on this issue with an MVP.
Nobody else has taken an interest on debating its aptness.
You said extension methods were part of .NET 3.0. Chris said that
wasn't true (and he's right). You then side-track the discussion, but
that's the whole point: what you think that's in .NET 3.0 isn't in .NET
3.0 but in the version released after that.

I also find debating a question like ".NET 3.0 is the answer?" rather
silly, because what's the question it HAS TO be the answer to? Unclear.
I can't help but think that this community makes people feel a bit
stand-offish from posting questions that might be considered 'newb'
or 'out-of-bounds' with regards to the use of certain technologies
and standardized design strategies. This is why you see so many
posts from beginners apologizing for their ignorance. We should all
be a bit more open to new ideas and take a more scientific approach
to answering questions and deriving answers and we'll all learn
something new from time to time.
I think the behavior of people who appologize for the level their
question is on is only to prevent them from getting a 'RTFM' answer,
which is normal usenet CYA basics if I might add.

I also don't see why rambling on how some people post here is relevant
to 'is .NET 3.0 the answer?', although that question isn't clear to me
as well.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Jul 25 '06 #31
Thanks for the feedback.

--
Dave Sexton

"Frans Bouma [C# MVP]" <pe******************@xs4all.nlwrote in message news:xn***************@news.microsoft.com...
Dave Sexton wrote:
>Hi Chris,
Also, you might not get much feedback because all LINQ-related
issues have received lots and lots of discussion on this forum
already, back when the whole bag of tricks was first announced.

I highly doubt that all LINQ-related issues have been discussed. Can
you point me to a thread that addresses my particular question on
extension methods related to sealed classes? I'll gladly read it as
I've only discussed a single perspective on this issue with an MVP.
Nobody else has taken an interest on debating its aptness.

You said extension methods were part of .NET 3.0. Chris said that
wasn't true (and he's right). You then side-track the discussion, but
that's the whole point: what you think that's in .NET 3.0 isn't in .NET
3.0 but in the version released after that.

I also find debating a question like ".NET 3.0 is the answer?" rather
silly, because what's the question it HAS TO be the answer to? Unclear.
>I can't help but think that this community makes people feel a bit
stand-offish from posting questions that might be considered 'newb'
or 'out-of-bounds' with regards to the use of certain technologies
and standardized design strategies. This is why you see so many
posts from beginners apologizing for their ignorance. We should all
be a bit more open to new ideas and take a more scientific approach
to answering questions and deriving answers and we'll all learn
something new from time to time.

I think the behavior of people who appologize for the level their
question is on is only to prevent them from getting a 'RTFM' answer,
which is normal usenet CYA basics if I might add.

I also don't see why rambling on how some people post here is relevant
to 'is .NET 3.0 the answer?', although that question isn't clear to me
as well.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

Jul 25 '06 #32
Hi Chris,

I said that I appreciate the information. I'm sorry that your sore about me ignoring your post but as I already stated I felt that
it didn't really need any response. Point was taken. Do you expect a simple thank you reply?

Thanks!

--
Dave Sexton

"Chris Nahr" <ch************@kynosarges.dewrote in message news:l1********************************@4ax.com...
On Mon, 24 Jul 2006 13:54:43 -0400, "Dave Sexton"
<dave@jwa[remove.this]online.comwrote:
>>You didn't attempt to address my question, so I didn't respond to your post. The information you provided might be useful or not,
but was off-topic.

The information directly related to the content of your original post.
>>Perhaps next time you should site your information with your post.

Excuse me for occasionally having better things to do than doing other
people's research...
>>As for "widely publicized", does Microsoft consider the blogs of
its employees to be there main channel of information to the community?

To the developer community, yes. It's been that way for about two
years at least. As you read the blogs you'll also note that a lot of
discussion is happening right there, in the comments sections.
--
http://www.kynosarges.de

Jul 25 '06 #33

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
5
by: Da Costa Gomez | last post by:
Hi, I was wondering whether someone could shed some light on the following. Using inheritance in Java one can override a function f() (or is it overload?) in the child and then do: public f() {...
8
by: Sim Smith | last post by:
This is the problem: I have to inherit a third party class file in my library. If I directly do it, I will have to ship the third party header files to my customers as well. I do not want to...
1
by: Richard | last post by:
I've read the posts here and VeriSign's KB articles, which pertain to the seal not displaying in development mode. However, the seal still won't show up on the .aspx production page, but it does...
1
by: Richard | last post by:
I've read the posts here and VeriSign's KB articles, which pertain to the seal not displaying in development mode. However, the seal still won't show up on the .aspx production page, but it does...
6
by: Ole Nielsby | last post by:
I'm having a strange problem with sealing virtual indexers. Looks like a compiler error to me - or have I overlooked some obscure statement in the specs? I have two virtual indexers in the...
5
by: Jon Slaughter | last post by:
Why did microsoft seal these classes? I would like to add coordinate information to these classes but I can't derive from them ;/ It makes me wonder why microsft choose to prevent anyone from...
10
by: =?Utf-8?B?ZGF2ZWJ5dGhlc2Vh?= | last post by:
Hi, I have created a Singleton class to provide some database functionality in my mobile application. I have a public class called Utility which performs various operations on data. Is it ok to...
0
by: raja | last post by:
Fault Seal Analysis Analyse Reservoir Fault, Lateral & Top Seal quickly and efficiently http://finance4u.synthasite.com/
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.