I've been trying to clear these error messages that I keep getting, was wondering if someone could help me out here.
1. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Lo cal\Temporary\p rojects\Windows Application1\Fo rm1.vb 59 33 WindowsApplicat ion1
2. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 60 45 WindowsApplicat ion1
3. Name 'oLaon' is not declared. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 25 WindowsApplicat ion1
4. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 43 WindowsApplicat ion1
5. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 62 44 WindowsApplicat ion1
6. Expression expected. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 63 87 WindowsApplicat ion1
7. Syntax error. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 64 25 WindowsApplicat ion1
8. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 94 33 WindowsApplicat ion1
9. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 95 41 WindowsApplicat ion
10. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 96 49 WindowsApplicat ion1
11. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 97 47 WindowsApplicat ion1
12. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 98 48 WindowsApplicat ion1
[code=vbnet]
Imports System.IO
Imports System.Text
Public Class Loan
Dim iTerm As Integer
Dim decRate As Decimal
Dim strDesc As String
Dim strLoanId As String
Public Property Term() As Integer
Get
Return iTerm
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Public Property iRate() As Decimal
Get
Return decRate
End Get
Set(ByVal value As Decimal)
decRate = value
End Set
End Property
Public Property Desc() As Integer
Get
Return strDesc
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Private Property LoanId() As Integer
Get
Return strLoanId
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Public Shared Function SelectLoanList( ) As ArrayList
Dim loanlist As New ArrayList()
Dim sr As StreamReader
Dim sPath As String
Dim sLine As String
Dim aLine As String
Try
#If DEBUG Then
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 9)
#Else
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 11)
#End If
sPath = sPath & "loans1.txt "
sr = New StreamReader(sP ath)
If Not IsNothing(sr) Then
Do
sLine = sr.ReadLine()
If Not IsNothing(sLine ) Then
Dim oLoan As New Loan()
aLine = sLine.Split("," )
oLoan.LoanId = CInt(aLine(0))
oLaon.Term = CInt(aLine(1))
oLoan.iRate = CDec(aLine(2))
oLoan.Desc = "Loan Amount" & oLoan.LoanId & ": " & oLoan.Term &
"Yrs @" & oLoan.iRate & "%"
loanlist.Add(oL oan)
End If
Loop
End If
Catch ex As Exception
Throw
End Try
Return loanlist
End Function
Public Shared Function SelectLoan(ByVa l iLoan As Integer) As Loan
Dim oloan As New Loan()
Dim sr As StreamReader
Dim sPath As String
Dim sLine As String
Dim aLine As String
Dim strLoan As New StringBuilder()
Try
#If DEBUG Then
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 9)
#Else
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 11)
#End If
sPath = sPath & "loans1.txt "
sr = New StreamReader(sP ath)
If Not IsNothing(sr) Then
Do
sLine = sr.ReadLine()
If Not IsNothing(sLine ) Then
aLine = sLine.Split("," )
If iLoan = CInt(aLine(0)) Then
oloan.LoanId = CInt(aLine(0))
oloan.Term = CInt(aLine(1))
oloan.iRate = CDec(aLine(2))
strLoan.Append( "Loan ")
strLoan.Append( oloan.LoanId)
strLoan.Append( ": ")
strLoan.Append( oloan.Term)
strLoan.Append( "Yrs@ ")
strLoan.Append( oloan.iRate)
strLoan.Append( "% ")
oloan.Desc = strLoan.ToStrin g
End If
End If
Loop Until sLine Is Nothing
End If
Catch ex As Exception
Throw
End Try
Return oloan
End Function
Private Sub ComboBox1_Selec tedIndexChanged (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ComboBox1.Selec tedIndexChanged
Try
ComboBox1.Items .Add("Loan 1: 7 Yrs @ 5.35%")
ComboBox1.Items .Add("Loan 2: 15 Yrs @ 5.5%")
ComboBox1.Items .Add("Loan 3: 30 Yrs @ 5.75%")
Catch ex As Exception
MsgBox(ex.ToStr ing)
Console.WriteLi ne(ex.ToString)
End Try
End Sub
End Class[/code]
1. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Lo cal\Temporary\p rojects\Windows Application1\Fo rm1.vb 59 33 WindowsApplicat ion1
2. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 60 45 WindowsApplicat ion1
3. Name 'oLaon' is not declared. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 25 WindowsApplicat ion1
4. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 61 43 WindowsApplicat ion1
5. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 62 44 WindowsApplicat ion1
6. Expression expected. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 63 87 WindowsApplicat ion1
7. Syntax error. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 64 25 WindowsApplicat ion1
8. Value of type '1-dimensional array of String' cannot be converted to 'String'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 94 33 WindowsApplicat ion1
9. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 95 41 WindowsApplicat ion
10. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 96 49 WindowsApplicat ion1
11. 'Char' values cannot be converted to 'Integer'. Use 'Microsoft.Visu alBasic.AscW' to interpret a character as a Unicode value or 'Microsoft.Visu alBasic.Val' to interpret it as a digit. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 97 47 WindowsApplicat ion1
12. Value of type 'Char' cannot be converted to 'Decimal'. C:\Users\Black & Gold\AppData\Lo cal\Temporary Projects\Window sApplication1\F orm1.vb 98 48 WindowsApplicat ion1
[code=vbnet]
Imports System.IO
Imports System.Text
Public Class Loan
Dim iTerm As Integer
Dim decRate As Decimal
Dim strDesc As String
Dim strLoanId As String
Public Property Term() As Integer
Get
Return iTerm
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Public Property iRate() As Decimal
Get
Return decRate
End Get
Set(ByVal value As Decimal)
decRate = value
End Set
End Property
Public Property Desc() As Integer
Get
Return strDesc
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Private Property LoanId() As Integer
Get
Return strLoanId
End Get
Set(ByVal value As Integer)
iTerm = value
End Set
End Property
Public Shared Function SelectLoanList( ) As ArrayList
Dim loanlist As New ArrayList()
Dim sr As StreamReader
Dim sPath As String
Dim sLine As String
Dim aLine As String
Try
#If DEBUG Then
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 9)
#Else
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 11)
#End If
sPath = sPath & "loans1.txt "
sr = New StreamReader(sP ath)
If Not IsNothing(sr) Then
Do
sLine = sr.ReadLine()
If Not IsNothing(sLine ) Then
Dim oLoan As New Loan()
aLine = sLine.Split("," )
oLoan.LoanId = CInt(aLine(0))
oLaon.Term = CInt(aLine(1))
oLoan.iRate = CDec(aLine(2))
oLoan.Desc = "Loan Amount" & oLoan.LoanId & ": " & oLoan.Term &
"Yrs @" & oLoan.iRate & "%"
loanlist.Add(oL oan)
End If
Loop
End If
Catch ex As Exception
Throw
End Try
Return loanlist
End Function
Public Shared Function SelectLoan(ByVa l iLoan As Integer) As Loan
Dim oloan As New Loan()
Dim sr As StreamReader
Dim sPath As String
Dim sLine As String
Dim aLine As String
Dim strLoan As New StringBuilder()
Try
#If DEBUG Then
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 9)
#Else
sPath = Microsoft.Visua lBasic.Left(App lication.Startu pPath, Len(Application .StartupPath) - 11)
#End If
sPath = sPath & "loans1.txt "
sr = New StreamReader(sP ath)
If Not IsNothing(sr) Then
Do
sLine = sr.ReadLine()
If Not IsNothing(sLine ) Then
aLine = sLine.Split("," )
If iLoan = CInt(aLine(0)) Then
oloan.LoanId = CInt(aLine(0))
oloan.Term = CInt(aLine(1))
oloan.iRate = CDec(aLine(2))
strLoan.Append( "Loan ")
strLoan.Append( oloan.LoanId)
strLoan.Append( ": ")
strLoan.Append( oloan.Term)
strLoan.Append( "Yrs@ ")
strLoan.Append( oloan.iRate)
strLoan.Append( "% ")
oloan.Desc = strLoan.ToStrin g
End If
End If
Loop Until sLine Is Nothing
End If
Catch ex As Exception
Throw
End Try
Return oloan
End Function
Private Sub ComboBox1_Selec tedIndexChanged (ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ComboBox1.Selec tedIndexChanged
Try
ComboBox1.Items .Add("Loan 1: 7 Yrs @ 5.35%")
ComboBox1.Items .Add("Loan 2: 15 Yrs @ 5.5%")
ComboBox1.Items .Add("Loan 3: 30 Yrs @ 5.75%")
Catch ex As Exception
MsgBox(ex.ToStr ing)
Console.WriteLi ne(ex.ToString)
End Try
End Sub
End Class[/code]
Comment