Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WwDotNetBridge
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01617874
Message ID:
01618117
Views:
60
Likes (1)
Yup same here.

I hate writing complex .NET code from FoxPro - it's so much easier to just write a short method in .NET and have the Fox code call that. It's always easier to write code directly in .NET rather than making multiple calls from FoxPro into .NET. Not only that but it'll be more efficient as well.

Of course that only works if you control the code, unless you add another front end assembly that acts as a proxy to the .NET calls, which often is not a bad choice either.

+++ Rick ---


>>I have another question. The signature for the method is this
>>
>>
>>static public string VerifyAddress( ref string AddressLine1, ref string AddressLine2, ref string City, ref string State, ref string ZipCode, ref string Country)
>>
>>So, although it may be not a good practice, my colleague (who wrote this method) returns new values using parameters passed by references. When I debug that DLL, I can see the new values, however, my call
>>
>
>I see Rick already replied, but normally if I have access to the underlying .NET source code I end up creating my own wrappers for things like this. For example, I'd create another VerifyAddress method (sorry, but yuck!) as:
>
>
>public static Address VerifyAddress(Address address)
>{
>    // Code to verify address here
>    // Create new Address class and populate properties, then return it.
>}
>
>public class Address
>{
>    public string AddressLine1 { get; set; }
>    public string AddressLine2 { get; set; }
>    public string City { get; set; }
>    public string State { get; set }
>    public string ZipCode { get; set; } 
>    public string Result { get; set; }
>}
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform