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 6850027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:04:26+00:00 2026-05-27T01:04:26+00:00

I am porting php code to vbnet (i’m a little better at vbnet than

  • 0

I am porting php code to vbnet (i’m a little better at vbnet than c#). In the php is the scope resolution operator.

Here’s the bit:

$args = phpZenfolio::processArgs( func_get_args() );

Equivalent in c#/vbnet?

The whole function is the following which i gues is equivalent to the sub new in vbnet.

    public function __construct()
{
    $args = phpZenfolio::processArgs( func_get_args() );
    $this->APIVer = ( array_key_exists( 'APIVer', $args ) ) ? $args['APIVer'] : '1.4';
    // Set the Application Name
    if ( ! isset( $args['AppName'] ) ) {
        throw new PhpZenfolioException( 'Application name missing.', -10001 );
    }
    $this->AppName = $args['AppName'];
    // All calls to the API are done via POST using my own constructed httpRequest class
    $this->req = new httpRequest();
    $this->req->setConfig( array( 'adapter' => $this->adapter, 'follow_redirects' => TRUE, 'max_redirects' => 3, 'ssl_verify_peer' => FALSE, 'ssl_verify_host' => FALSE, 'connect_timeout' => 5 ) );
    $this->req->setHeader( array( 'User-Agent' => "{$this->AppName} using phpZenfolio/{$this->version}",
                                  'X-Zenfolio-User-Agent' => "{$this->AppName} using phpZenfolio/{$this->version}",
                                  'Content-Type' => 'application/json' ) );
}

Here is the process args bit:

private static function processArgs( $arguments )
 {
    $args = array();
    foreach ( $arguments as $arg ) {
        if ( is_array( $arg ) ) {
            $args = array_merge( $args, $arg );
        } else {
            if ( strpos( $arg, '=' ) !== FALSE ) {
                $exp = explode('=', $arg, 2);
                $args[$exp[0]] = $exp[1];
            } else {
                $args[] = $arg;
            }
        }
    }

    return $args;
  }
  • 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-27T01:04:26+00:00Added an answer on May 27, 2026 at 1:04 am

    You’re trying to call a static method:

    ClassName.MethodName(args);
    

    The method must be explicitly declared as static (Shared in Visual Basic) and cannot access this (Me in Visual Basic).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm porting a small snippet of PHP code to java right now, and I
I'm working on porting some PHP code to C, that contacts a web API.
I'm porting some code from PHP to .NET (I'm not a PHP developer) and
I am rewriting a web application and will be porting procedural PHP code to
I'm porting a piece of code from PHP to c/objective-c, and I'm running into
I'm porting some PHP to C++. Some of our database code stores time values
I am planning on porting a PHP application over to Python. The application is
Im porting a project from php to java. The project is a web-app based
Porting code from 32bit to 64bit. Lots of places with int len = strlen(pstr);
I'm trying to mimic the json_encode bitmask flags implemented in PHP 5.3.0, here is

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.