卡住的编码 [英] Stuck Coding

查看:70
本文介绍了卡住的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Private Sub exitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click
        Me.Close()
    End Sub

    Private Sub translateButton_Click(sender As Object, e As EventArgs) Handles translateButton.Click
        Dim originalWord As String = ""
        Dim translatedWord As String = ""

        If fatherRadioButton.Checked Then
            originalWord = "Father"
        ElseIf motherRadioButton.Checked Then
            originalWord = "Mother"
        End If

        If spanishRadioButton.Checked Then

            translatedWord = toSpanish(originalWord, translatedLabel)
        ElseIf frenchRadioButton.Checked Then
            translatedLabel = toFrench(originalWord, translatedLabel)
        End If


    End Sub

    Private Function toSpanish(ByVal original As String, ByRef translated As String)
        If original = "Father" Then
            translated = "padre"
        ElseIf original = "Mother" Then
            translated = "madre"
        End If
        Return translated
    End Function

    Private Function toFrench(ByVal original As String, ByVal translated As String)
        If original = "Father" Then
            translated = "père"
        ElseIf original = "Mother" Then
            translated = "mère"
        End If
        Return translated
    End Function
End Class

需要代码帮助.无法找出问题所在

推荐答案

您需要描述问题-您期望该代码做什么,以及它实际上在做什么?

You need to describe the problem - what are you expecting this code to do, and what is it actually doing?

如果有错误,请发布确切的错误消息以及发生错误的代码行.

If there is an error, please post the exact error message and the line of code at which it occurs.


这篇关于卡住的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆