473,320 Members | 1,612 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,320 software developers and data experts.

cannot derive from sealed type 'float'

I try to compile myGeneration source code using Visual C# Express 2005
Express.

File starts with

using System;
using System.Xml;
using System.Data;
using System.Data.OleDb;

namespace MyMeta
{
public class Table : Single, ITable, INameValueItem
{
public Table()
{

}
compiling causes error in "public class Table line":

MyMeta.Table': cannot derive from sealed type 'float'
This is working code so i expect that code is correct and can be compiled t
can be compiled in some way without changing it.

Why I got compile error ?
How to fix ?

Andrus.

Jul 20 '07 #1
2 5297
I try to compile myGeneration source code using Visual C# Express 2005
Express.

File starts with

using System;
using System.Xml;
using System.Data;
using System.Data.OleDb;
namespace MyMeta
{
public class Table : Single, ITable, INameValueItem
{
public Table()
{
}

compiling causes error in "public class Table line":

MyMeta.Table': cannot derive from sealed type 'float'

This is working code so i expect that code is correct and can be
compiled t can be compiled in some way without changing it.

Why I got compile error ?
How to fix ?
Andrus.
Do you have your own 'Single' type? The compiler treats the 'Single' you
mention as System.Single, for which 'float' is an alias.
If it is your own type, use the full namespace.

Hans Kesting
Jul 20 '07 #2
Andrus,

It is not working code. Single (float) is a value type, and they are
sealed, you can not derive from them.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Andrus" <ko********@hot.eewrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
>I try to compile myGeneration source code using Visual C# Express 2005
Express.

File starts with

using System;
using System.Xml;
using System.Data;
using System.Data.OleDb;

namespace MyMeta
{
public class Table : Single, ITable, INameValueItem
{
public Table()
{

}
compiling causes error in "public class Table line":

MyMeta.Table': cannot derive from sealed type 'float'
This is working code so i expect that code is correct and can be compiled
t can be compiled in some way without changing it.

Why I got compile error ?
How to fix ?

Andrus.

Jul 20 '07 #3

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

Similar topics

5
by: Bharat Karia | last post by:
Hi, Is it possible to writed Sealed classes in C++ . i.e. there is no sealed/final keyword in C++, but is it possible to achieve the same effect? i.e. deriving from a sealed class is an error...
3
by: Marcin Kowalewski | last post by:
Hi I've got a stupid problem with code below : using System; using System.Drawing; .... public class CsrcImage :Image { public CsrcImage() { //
13
by: Mark Rae | last post by:
Hi, Since sealed classes can't be instantiated with the new keyword e.g. CClass objClass = new CClass(), does this mean that they don't have constructors / deconstructors or, if they do, that...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
0
by: Ken Varn | last post by:
I have the following code that I cannot get to compile. I get the error "A Sealed class cannot be abstract." public __value struct DVRAVIFileHeader : public ISerializable { double EventID;...
3
by: bg_ie | last post by:
Hi, I am using a API I downloaded from the internet programmed in C. I need the function below which works with this api in my c++ file - void StoreNoteCallback(void *context, int arglen,...
2
by: andy6 via DotNetMonster.com | last post by:
I took a c++ 6.0 project and converted it to c++ .net 2005 project. I want to make a web service out of it. One of the new files I created was a cpp where I have the webmethod pointing to a...
7
by: Zytan | last post by:
I know you cannot have a sealed static class, but why not? Why must static classes be left open to inheritance? This article: http://msdn.microsoft.com/msdnmag/issues/03/07/NET/ recommends to...
1
by: ivanet | last post by:
Hello everyone, I am trying to use the following Schema but I get the error "src- resolve: Cannot resolve the name 'ValuesList' to a(n) 'element declaration' component." at line 144. I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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.