سلام خدمت کاربران وب سایت پروگرم 98 😉 در این مطلب آموزش استفاده از کلیدها برای گرفتن مقدارها از generic SortedDictionary در سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
خروجی این کد به صورت زیر می باشد:
A, Salary: $7.00
B, Salary: $5.00
C, Salary: $4.00
D, Salary: $9.00
B, Salary: $5.00
C, Salary: $4.00
D, Salary: $9.00
کد استفاده از کلیدها برای گرفتن مقدارها از generic SortedDictionary در سی شارپ #C :
using System;
using System.Collections.Generic;
class MainClass {
public static void Main() {
SortedDictionary<string, double> dict = new SortedDictionary<string, double>();
dict.Add("A", 7);
dict.Add("B", 5);
dict.Add("C", 4);
dict.Add("D", 9);
using System.Collections.Generic;
class MainClass {
public static void Main() {
SortedDictionary<string, double> dict = new SortedDictionary<string, double>();
dict.Add("A", 7);
dict.Add("B", 5);
dict.Add("C", 4);
dict.Add("D", 9);