Click here to Skip to main content
15,867,308 members
Home / Discussions / C#
   

C#

 
GeneralRe: Wierd exceptions when calling WCF more than once from a static class [modified] Pin
Michael900017-Jan-11 12:27
Michael900017-Jan-11 12:27 
QuestionAnyone work with Microsoft Dynamics Great Plains? Pin
DeepToot17-Jan-11 5:53
DeepToot17-Jan-11 5:53 
QuestionUsing a Class in a C# console application [modified] Pin
B Don Davis17-Jan-11 4:46
B Don Davis17-Jan-11 4:46 
AnswerRe: Using a Class in a C# console application PinPopular
Pete O'Hanlon17-Jan-11 5:16
subeditorPete O'Hanlon17-Jan-11 5:16 
GeneralRe: Using a Class in a C# console application Pin
Michael900017-Jan-11 8:40
Michael900017-Jan-11 8:40 
GeneralRe: Using a Class in a C# console application Pin
Pete O'Hanlon17-Jan-11 9:09
subeditorPete O'Hanlon17-Jan-11 9:09 
GeneralRe: Using a Class in a C# console application Pin
Michael900017-Jan-11 11:59
Michael900017-Jan-11 11:59 
AnswerRe: Using a Class in a C# console application Pin
#realJSOP18-Jan-11 4:45
mve#realJSOP18-Jan-11 4:45 
When I ran it through the converter found here:

http://www.developerfusion.com/tools/convert/csharp-to-vb/[^]

I got this:

VB
Public Function QuadKeyToBBox(quadKey As String) As String
    Dim TILE_HEIGHT As Integer = 256
    Dim TILE_WIDTH As Integer = 256
    Dim zoom As Integer = quadKey.Length
    Dim x As Integer = 0
    Dim y As Integer = 0

    For i As Integer = zoom To 1 Step -1
        Dim mask As Integer = 1 << (i - 1)
        Select Case quadKey(zoom - i)
            Case "0"C
                Exit Select
            Case "1"C
                x = x Or mask
                Exit Select
            Case "2"C
                y = y Or mask
                Exit Select
            Case "3"C
                x = x Or mask
                y = y Or mask
                Exit Select
            Case Else
                Throw New ArgumentException("Invalid QuadKey digit sequence.")
        End Select
    Next

    Dim W As Double = CSng(x * TILE_WIDTH) * 360 / CSng(TILE_WIDTH * Math.Pow(2, zoom)) - 180
    Dim N As Double = CSng(Math.Asin((Math.Exp((0.5 - ((y * TILE_HEIGHT) / (TILE_HEIGHT)) / Math.Pow(2, zoom)) * 4 * Math.PI) - 1) / (Math.Exp((0.5 - ((y * TILE_HEIGHT) / 256) / Math.Pow(2, zoom)) * 4 * Math.PI) + 1))) * 180 / CSng(Math.PI)
    Dim E As Double = CSng((x + 1) * TILE_WIDTH) * 360 / CSng(TILE_WIDTH * Math.Pow(2, zoom)) - 180
    Dim S__1 As Double = CSng(Math.Asin((Math.Exp((0.5 - (((y + 1) * TILE_HEIGHT) / (TILE_HEIGHT)) / Math.Pow(2, zoom)) * 4 * Math.PI) - 1) / (Math.Exp((0.5 - (((y + 1) * TILE_HEIGHT) / 256) / Math.Pow(2, zoom)) * 4 * Math.PI) + 1))) * 180 / CSng(Math.PI)
    Dim bounds As Double() = New Double() {W, S__1, E, N}

    Return String.Join(",", Array.ConvertAll(bounds, Function(s__2) s__2.ToString()))
End Function


I have no idea how this is going to work because I just converted it and pasted it here (with some corrections where the converter incorrectly inserted backslashes in the converted code).
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997


GeneralRe: Using a Class in a C# console application Pin
B Don Davis18-Jan-11 14:08
B Don Davis18-Jan-11 14:08 
Questionsql server express Pin
arkiboys17-Jan-11 3:25
arkiboys17-Jan-11 3:25 
AnswerRe: sql server express Pin
Dan Mos17-Jan-11 3:45
Dan Mos17-Jan-11 3:45 
GeneralRe: sql server express Pin
arkiboys17-Jan-11 3:53
arkiboys17-Jan-11 3:53 
GeneralRe: sql server express Pin
Dan Mos17-Jan-11 3:59
Dan Mos17-Jan-11 3:59 
JokeRe: sql server express Pin
Henry Minute17-Jan-11 6:01
Henry Minute17-Jan-11 6:01 
GeneralRe: sql server express Pin
Dan Mos17-Jan-11 9:10
Dan Mos17-Jan-11 9:10 
GeneralRe: sql server express Pin
Henry Minute17-Jan-11 9:20
Henry Minute17-Jan-11 9:20 
GeneralRe: sql server express Pin
Bernhard Hiller17-Jan-11 21:05
Bernhard Hiller17-Jan-11 21:05 
AnswerRe: sql server express Pin
Ravi Sant17-Jan-11 3:51
Ravi Sant17-Jan-11 3:51 
GeneralRe: sql server express Pin
arkiboys17-Jan-11 4:08
arkiboys17-Jan-11 4:08 
GeneralRe: sql server express Pin
Henry Minute17-Jan-11 6:23
Henry Minute17-Jan-11 6:23 
GeneralRe: sql server express Pin
arkiboys19-Jan-11 0:31
arkiboys19-Jan-11 0:31 
GeneralRe: sql server express Pin
Henry Minute19-Jan-11 1:15
Henry Minute19-Jan-11 1:15 
AnswerRe: sql server express Pin
Steve Maier17-Jan-11 4:38
professionalSteve Maier17-Jan-11 4:38 
QuestionUser account rights Pin
marca29217-Jan-11 2:19
marca29217-Jan-11 2:19 
AnswerRe: User account rights Pin
_Erik_17-Jan-11 2:52
_Erik_17-Jan-11 2:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.