Avatar of JRockFL
JRockFL
Flag for United States of America asked on

Type.GetType returning null

Please look at the screen shot.
Type.GetType() is returning null.

I have a reference to the assembly BaitShop.Payment.AuthorizeNetScreen shot of Visual Studiofrom BaitShop.BusinessLogic
C#

Avatar of undefined
Last Comment
JRockFL

8/22/2022 - Mon
kaufmed

What value does Data.Payment.GetAssemblyForDefaultGateway return?
p_davis

Can you post the code for that method
Are you checking for null and returning a default value
JRockFL

ASKER
Here is the code. If you look in the immediate window of the screen shot, it returns null.

namespace BaitShop.Data
{
    public class Payment
    {
        private const string GATEWAY = "BaitShop.Payment.AuthorizeNet.AuthorizeNetProcessor, BaitShop.Payment.AuthorizeNet";

        public static string GetAssemblyForDefaultGateway()
        {
            return GATEWAY;
        }
    }
}
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
p_davis

Did you try making the private member static
JRockFL

ASKER
If you look at the immediate window, it is returning null.
p_davis

Well either way, would make your public method a public property
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
kaufmed

You haven't modified the namespace(s) within AuthorizeNetProcessor.cs, correct? And the class name matches the filename, yes?

If you break on that line, and then enter the following in the Immediate Window, do you get a good result back?

?System.Reflection.Assembly.Load("BaitShop.Payment.AuthorizeNet")
ASKER CERTIFIED SOLUTION
JRockFL

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
JRockFL

ASKER
This is the correct solution