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

  • SEARCH
  • Home
  • 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 532097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:22:11+00:00 2026-05-13T09:22:11+00:00

Is it possible to get the parameter name (where I have parmName below)? Or

  • 0

Is it possible to get the parameter name (where I have parmName below)?
Or perhaps in the MSIL code there are only relative positions, no absolute parm names?

I have an unusual case using HIP within Microsoft Host Integration Server. When fields are NULL and the error goes back to CICS (on the mainframe), the error is “A CALL TO VERIFYINVOKEPARAMS FAILED”. I have hard-coded a solution, but was trying to make a general solution that would work for any HIP subroutine.

Thanks,

Neal Walters

    // check for null values in any of the parameters 
    MethodBase method = MethodBase.GetCurrentMethod();
    //string key = method.Name + "(";
    for (int i = 0; i < method.GetParameters().Length; i++)
    {
        if (method.GetParameters().GetValue(i).GetType() == typeof(String))
        {
            if (method.GetParameters().GetValue(i) == null)
            {
                string parmName = " Parm #" + i; 
                msg = "Value of return variable " + parmName + " is null (should be blanks)";
                System.Diagnostics.EventLog.WriteEntry("LOGGER", msg, 
                    System.Diagnostics.EventLogEntryType.Error);

            }
        }
    }

Extra info:
I’m calling a BizTalk Orch published as a WCF web service. When it gets errors, some fields are not serialzied back to the above program. This is how the values got to be NULL in the first place. But the CICS/application that is calling my HIS/HIP program doesn’t like nulls.

NOTE:
The follow-up question on how to get the values is here:
C# Getting value of parms using reflection

  • 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-05-13T09:22:11+00:00Added an answer on May 13, 2026 at 9:22 am

    Try this:

    var parameters = MethodBase.GetCurrentMethod().GetParameters();
    foreach (ParameterInfo parameter in parameters)
    {
        Console.WriteLine(parameter.Name);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation in which there's an HTTP GET parameter with name Date
Possible Duplicate: How can I get a specific parameter from location.search? I have a
Is it possible for an rspec method to get the value of the parameter
Possible Duplicate: Get URL of ASP.Net Page in code-behind I'm trying to hold current
Possible Duplicate: get name of current PHP script in include file Can an included
Is it possible to retrieve flashvar parameter in mxml code and if so how?
Possible Duplicate: How to get model's field name in custom editor template When outputting
I have a Wordpress page that accepts a query string argument: http://x.com/page-name/?parameter=value This works
I have code that gives a list of all possible values for any given
I have a DLL. from which I would like to get the app's name.

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.