Skip to content

Instantly share code, notes, and snippets.

Created January 2, 2015 11:18
Show Gist options
  • Save anonymous/13bb915da5a54b47bf93 to your computer and use it in GitHub Desktop.
Save anonymous/13bb915da5a54b47bf93 to your computer and use it in GitHub Desktop.
Private Sub getMaxArray2(ByVal array() As Integer)
Dim array_clone() As Integer = array.Clone
System.Array.Sort(array_clone)
Dim max_value As Integer = array_clone(UBound(array)) '最大値
'Dim min_value As Integer = array_clone(LBound(array)) '最小値
Dim max_index As Integer = System.Array.IndexOf(array, max_value)
MsgBox("最大値は array(" + max_index.ToString + ") = " + max_value.ToString)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment