-
c# to vb .net (2005) help
I want to convert this c# code to vb, please help.
while (
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
window[++scan] == window[++match] &&
(scan < strend))
{
// Do nothing
}
Thanks
Javfarary
-
There is no simple translation for this in VB. The VB equivalent is quite convoluted.
-
is it not possible to do the same thing in vb .net?
guide me.
Thanks
Javfarary
-
Yes - it is possible. "alanfo" posted something close to an equivalent on another group.
But, as I mentioned elsewhere, there are many cases of "assignments within expressions" that cannot be generalized for automatic conversion. There are even some cases that have no possible VB equivalent (I'll try to dig one up for you today).
-
Here is a working equivalent - you should now see why automatic conversion of assignments within expressions is a bad idea - no one would want to see their code butchered like this by a converter:
Code:
Do
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
scan = scan + 1
match = match + 1
If window(scan) = window (match) Then
If scan < strend Then
' Do Nothing
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Else
Exit Do
End If
Loop
Similar Threads
-
Replies: 1
Last Post: 05-13-2005, 06:46 AM
-
By Jim Underwood in forum .NET
Replies: 3
Last Post: 02-28-2002, 09:45 PM
-
By Jim Pragit in forum .NET
Replies: 64
Last Post: 10-20-2001, 08:06 PM
-
Replies: 214
Last Post: 06-01-2001, 07:27 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks