Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cannot create an instance of the abstract class or interface

Posted on 2006-06-16
3
Medium Priority
?
339 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 2000 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

596 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