|
分類:[VB.NET/VB2005 以降]
下の @ の部分に「エラー BC30179 structure 'datt' と structure 'datt' が
namespace 'WindowsApp1' で競合しています」が出てしまい困っています。
よろしくお願いします。
Module Module1
Public Sub MySub(ByVal dat() As datt)
' ここに共通の処理コードを書く
End Sub
End Module
'Form1の構造体を宣言
Public Structure datt '@
Dim da1 As Single
Dim da2 As Single
End Structure
Public Class Form1
Dim dat(10) As datt
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Call MySub(dat)
End Sub
End Class
'Form2の構造体を宣言
Public Structure datt
Dim da1 As Single
Dim da2 As Single
End Structure
Public Class Form2
Dim dat(10) As datt
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Call MySub(dat)
End Sub
End Class
|