|
|
|
Как сконвертировать Dictionary в свой тип Dictionary ?
|
|||
|---|---|---|---|
|
#18+
Такой код: Код: c# 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. И вот тут возникает ошибка: Код: c# 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Текст ошибки: Cannot implicitly convert type 'System.Collections.Generic.Dictionary<ConsoleApp1.MyClassKey, ConsoleApp1.MyClassValue>' to 'ConsoleApp1.MyDict'. An explicit conversion exists (are you missing a cast?) Как из первоначального List'а получить словарь моего типа ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.03.2020, 11:46 |
|
||
|
Как сконвертировать Dictionary в свой тип Dictionary ?
|
|||
|---|---|---|---|
|
#18+
? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.03.2020, 12:07 |
|
||
|
Как сконвертировать Dictionary в свой тип Dictionary ?
|
|||
|---|---|---|---|
|
#18+
Решил проблему. У словаря есть такой конструктор: public Dictionary(IDictionary<TKey, TValue> dictionary). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.03.2020, 12:18 |
|
||
|
|

start [/forum/search_topic.php?author=nodefault&author_mode=last_topics&do_search=1]: |
0ms |
get settings: |
12ms |
get forum list: |
16ms |
get settings: |
10ms |
get forum list: |
18ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
179ms |
get topic data: |
10ms |
get first new msg: |
6ms |
get forum data: |
3ms |
get page messages: |
51ms |
get tp. blocked users: |
1ms |
| others: | 464ms |
| total: | 778ms |

| 0 / 0 |
