Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:14:42+00:00 2026-06-18T07:14:42+00:00

I was initially using the following method – which was working fine var obj

  • 0

I was initially using the following method – which was working fine

var obj = Activator.CreateInstance("MyProject","MyProject.MyImpl");

Now I am getting an error at the above line and the error is:

Exception has been thrown by the target of an invocation.

Any suggestions on what might be going wrong ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:14:43+00:00Added an answer on June 18, 2026 at 7:14 am

    The easiest would be to set a breakpoint in the constructor of the MyImpl class and debug it.

    One tricky problem you might be having is if the exception is actually not thrown directly by the constructor, but by some field initializer.

    For example the following would cause the behavior you described, even though there is no explicit constructor that could throw anything.

    public class MyImpl
    {
        private int something = ThisMethodThrows();
    
        private int ThisMethodThrows()
        {
            throw new Exception();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using the following structure: hash_map<string, list<time_t>> When I initially fill the hash map
Update: Based on the answers I initially went the route of using IsInstanceOf() which
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I have an Update method in my repository which I'm using to update articles
In writing a class recently, I initially included a __repr__ method along the following
So I have a table Links of links, that was initially populated using Nokogiri.
I am using jcarousel on a page in 3 different sections. I initially show
I am using C# to read a ~120 MB plain-text CSV file. Initially I
I am using MVC4's WEB API to expose a controller. Initially I created created
As I've come to understand using $('.whatever').click() only works for items created initially. Additional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.