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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:45:09+00:00 2026-05-15T19:45:09+00:00

We are currently converting our old base VB.Net to C #. Converting the bulk

  • 0

We are currently converting our old base VB.Net to C #. Converting the bulk of the code is not a problem .. there are good converters around. The problem we are facing is that none of the tested converters can convert () in [] in arrays and collections.

Example: Session (“abcd”) to Session [“abcd”];. Converters think Session is a method/function and leave with the parenthesis.

My question is: is there any regular expression that can be used in find/replace in Visual Studio 2008 that can make this substitution? Why do it manually to get tired when you have to do it over 200 times per class.

Thank you for attention

  • 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-15T19:45:10+00:00Added an answer on May 15, 2026 at 7:45 pm

    If you want to automate this, you need a converter that can parse VB.NET code like a compiler would.

    If you just want to replace Session (whatever) with Session [whatever], you can search for the regular expession (Session *)\((.*?)\) and replace with $1[$2]. Or search for ((?:Session|otherkeyword|thirdkeyword) *)\((.*?)\) and replace with the same if there are multiple keywords that can precede your arrays.

    My regexes are Perl-style. They’ll work in many modern text editors as well as with .NET’s Regex class. The VS IDE has its own regex flavor that’s not really compatible with anything else.

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

Sidebar

Related Questions

I'm currently converting our company database application from VB to ASP.NET. This is pretty
I'm working on converting an old C program (currently run on UNIX) into our
I'm currently converting some legacy code to create PDF files using iTextSharp. We're creating
I'm currently having an issue wrapping my brain around the notion of converting my
We are looking at converting our currently in development WCF REST API to use
We are currently using Subversion as our source code repository. We are in the
I'm currently converting a test class which extended the Spring class AbstractTransactionalSpringContextTests to Spring
Currently working with converting SQLException error messages into messages that are more useful for
I am currently working on converting a ColdFusion website, using Fusebox framework, to PHP.
I'm currently building a converter in C#. My program is converting from/to Decimal, Binary

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.