Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

String conversion in vb.net

Posted on 2009-05-01
4
Medium Priority
?
356 Views
Last Modified: 2012-05-06
Hi,
Need help to convert this vb6.0 code in vb.net


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

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

Open in new window

0
Comment
Question by:RIAS
  • 2
4 Comments
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24277445
This may work.


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

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 24277453
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

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24277457
sorry.... actually I have made function like VB in VB.net, right, left,len etc, it won't work with you.
0
 

Author Comment

by:RIAS
ID: 24279354
its alright  but thanks for yuor effort
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression

577 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