Solved

Cannot create an instance of the abstract class or interface

Posted on 2006-06-16
3
322 Views
Last Modified: 2010-04-16
I converted a java ejb module to .NET and worked out all the errors except 1.  The error message says "Cannot create an instance of the abstract class or interface [name of class]. Could someone suggest some reasons why this would be happening?
0
Comment
Question by:adonavon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 16920186
Is it a class or an interface?  You cannot instantiate abstract classes or interfaces directly.  For interfaces, you need to create a class that implements that interface, and for an abstract class you need to create a class that inherits from the abstract class.
0
 
LVL 25

Assisted Solution

by:dstanley9
dstanley9 earned 500 total points
ID: 16920192
Also, can you post the Java class declaration and the C# class declaration?  Maybe something got lost in the translation.
0
 

Author Comment

by:adonavon
ID: 16920595
Turns out it was none of the things you suggested.  The problem was that I couldn't use an abstract class in my situation.  Thanks for your assistance though.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question