String conversion in

Posted on 2009-05-01
Last Modified: 2012-05-06
Need help to convert this vb6.0 code in

CurrLine = Trim(Right(CurrLine, Len(CurrLine) - (InStr(CurrLine, "*/") + 1)))

CurrLine = Trim(Right(CurrLine, Len(CurrLine) - (InStr(CurrLine, "*/") + 1)))

Open in new window

Question by:RIAS
    LVL 31

    Expert Comment

    This may work.

    CurrLine=(Right(CurrLine,Len(CurrLine)-(SubString(CurrLine,"*/") + 1))).ToString().Trim()
    LVL 74

    Accepted Solution

    The above should still work in VB.NET. However, if you are trying to be more object-oriented, then:
    CurrLine = CurrLine.SubString(CurrLine.IndexOf("*/") + 1).Trim()

    Open in new window

    LVL 31

    Expert Comment

    sorry.... actually I have made function like VB in, right, left,len etc, it won't work with you.

    Author Comment

    its alright  but thanks for yuor effort

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A short article about problems I had with the new location API and permissions in Marshmallow
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now