掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
こんなことできないでしょうか? (ID:90437)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
.NET Framework 的には、こうかな。 Public Class ControlArray Public Shared Function GetIndex(ByVal sender As Object) As Integer Dim hControl As Control = DirectCast(sender, Control) If Not hControl Is Nothing Then Dim nIndex As String = String.Empty Dim nName As String = hControl.Name For i As Integer = hControl.Name.Length - 1 To 0 Step -1 If Char.IsDigit(nName.Chars(i)) Then nIndex = nName.Chars(i) & nIndex Else Exit For End If Next i If nIndex <> String.Empty Then Return Int32.Parse(nIndex) End If End If End Function End Class
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.