web 2.0

VB.NET & SortedList.IndexOfValue()

VB.NET & SortedList.IndexOfValue() - SortedList.IndexOfValue() : Returns the zero-based index of the first occurrence of the specified value in a SortedList object.

ShotDev Focus:
- VB.NET & SortedList.IndexOfValue()

Example

AspNetSortedListIndexOfValue.aspx

  1. <%@ Page Language="VB" %>  
  2. <script runat="server">  
  3. Sub Page_Load(sender As Object, e As EventArgs)  
  4. Dim objSortedList As SortedList  
  5. Dim i As Integer  
  6. Dim lsItem As String  
  7.   
  8. objSortedList = New SortedList  
  9.   
  10. objSortedList.Add("white""#FFFFFF")  
  11. objSortedList.Add("black""#000000")  
  12. objSortedList.Add("red""#FF0000")  
  13. objSortedList.Add("yellow""#FFFF00")  
  14. objSortedList.Add("green""#00FF00")  
  15.   
  16. Me.lblText.Text = objSortedList.IndexOfValue("#FFFFFF")  
  17.   
  18. End Sub  
  19. </script>  
  20. <html>  
  21. <head>  
  22. <title>ShotDev.Com Tutorial</title>  
  23. </head>  
  24. <body>  
  25. <form id="form1" runat="server">  
  26. <asp:Label id="lblText" runat="server"></asp:Label>  
  27. <br />  
  28. </form>  
  29. </body>  
  30. </html>  

Screenshot

 VB.NET & SortedList.IndexOfValue()
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.