Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Christmas Elf Doll
anil1961
Updated:
Sunday at 6:49 PM
AI Chat Bot for Websites
sajith.xp.pk
Updated:
Thursday at 1:17 PM
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Nov 7, 2026
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Nov 4, 2026
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
VB.net Danna ekekgen help ekak
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="DjSpK" data-source="post: 19442284" data-attributes="member: 139923"><p>[code]</p><p>Public Class Form1</p><p> Dim DataList As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer)</p><p> Dim AvgPrice As Integer = 0</p><p> Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click</p><p> If Not DataList.ContainsKey(TextBox1.Text) Then</p><p> DataList.Add(TextBox1.Text, Int(TextBox2.Text))</p><p> Else</p><p> If Not DataList(TextBox1.Text).Equals(Int(TextBox2.Text)) Then</p><p> DataList(TextBox1.Text) = Int(TextBox2.Text)</p><p> End If</p><p> End If</p><p> UpdateList()</p><p> End Sub</p><p></p><p> Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click</p><p> DataList.Remove(DataList.ToArray(ComboBox1.SelectedIndex).Key)</p><p> UpdateList()</p><p> End Sub</p><p> Private Sub UpdateList()</p><p> ComboBox1.Items.Clear()</p><p> AvgPrice = 0</p><p> For Each ListItem As KeyValuePair(Of String, Integer) In DataList</p><p> ComboBox1.Items.Add(ListItem.Key & " | Price : " & ListItem.Value)</p><p> AvgPrice = AvgPrice + ListItem.Value</p><p> Next</p><p> Label4.Text = AvgPrice / DataList.Count</p><p> End Sub</p><p>End Class</p><p>[/code]</p><p>Source : <a href="https://dl.dropboxusercontent.com/u/24436775/ComboTest.zip" target="_blank">https://dl.dropboxusercontent.com/u/24436775/ComboTest.zip</a></p></blockquote><p></p>
[QUOTE="DjSpK, post: 19442284, member: 139923"] [code] Public Class Form1 Dim DataList As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer) Dim AvgPrice As Integer = 0 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If Not DataList.ContainsKey(TextBox1.Text) Then DataList.Add(TextBox1.Text, Int(TextBox2.Text)) Else If Not DataList(TextBox1.Text).Equals(Int(TextBox2.Text)) Then DataList(TextBox1.Text) = Int(TextBox2.Text) End If End If UpdateList() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click DataList.Remove(DataList.ToArray(ComboBox1.SelectedIndex).Key) UpdateList() End Sub Private Sub UpdateList() ComboBox1.Items.Clear() AvgPrice = 0 For Each ListItem As KeyValuePair(Of String, Integer) In DataList ComboBox1.Items.Add(ListItem.Key & " | Price : " & ListItem.Value) AvgPrice = AvgPrice + ListItem.Value Next Label4.Text = AvgPrice / DataList.Count End Sub End Class [/code] Source : [url]https://dl.dropboxusercontent.com/u/24436775/ComboTest.zip[/url] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom