Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP .Net Toolkit Question 1

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I'm trying to implement the PROPER function of the VFP Toolkit for .Net and running into a problem. I set up the IMPORTS to System.Text.StringBuilder, but it still shows up in my function as being undefined. Has anybody set up the PROPER function and encountered the same thing.

Steve


 
If I were to guess I would say that you are missing a reference. I haven't used the VFP toolkit for .NET, but a missing reference could cause this.

However, given that you are using VB.NET I think the easier softer way to do this might be...

strPropCase = StrConv(strVal, VbStrConv.ProperCase)



boyd.gif

SweetPotato Software Website
My Blog
 
Thanks for the alternative Craig. I'll give it a try when I get back to the office on Monday.

Steve
 
Craig,

That did it... thanks. It's hard enough learning .Net without having to learn VB to know all the options available to it.

Steve
 
Steve,

Glad to hear you got it working. I try to stay away from VB.NET whenever possible and work with C# instead. I've been working in VB from the time 4.0 came out (in 16-bit and 32-bit flavors). I wouldn't go so far as to say I hate the syntax, but my bottles of aspirin seem to last longer when I code in C#.

That having been said, there are two things that are particular nice about VB.NET. One is optional parameters, and the other is in this particular instance since C# doesn't have a native function for doing this. In order to Propercase a string in C# it would take several lines of code in a user-defined method or you would have to in a sense revert to VB.NET by fully qualifying Microsoft.VisualBasic.Strings.StrConv.

boyd.gif

SweetPotato Software Website
My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top