Questions tagged [idictionary]

System.Collections.IDictionary and System.Collections.Generic.IDictionary interfaces in the BCL (Base Class Library) of the .NET framework represent a collection of key-value pairs.

System.Collections.IDictionary and System.Collections.Generic.IDictionary<TKey, TValue>interfaces in the BCL (Base Class Library) of the .NET framework represent a collection of key-value pairs.

MSDN links:

148 questions
0
votes
1 answer

c# IDictionary dropdown httpPost

I have a page with af form with a dropdownlist with products in it and on that page is also some info about the order. Thats why I made a viewmodel to send the products and the orders to the htmlpage. I want to submit the selected product from the…
0
votes
2 answers

How to save a string plus its state into List?

I have this following Code in C# using EF Core 1.2 where I'm reading the input of a textarea and check each line if it matches one of my patterns. After checking one line I'm trying to set a state which tells me if it matches one pattern. Now I…
Joe Jonsman
  • 103
  • 1
  • 6
0
votes
2 answers

List> adding more List> with title

Hey all I am trying to add (or merge if you want to call it that) a few List> that I have created that look like this: List> eachTblColumnProperties = new List> { …
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
5 answers

How to pass dictionary values without having to iterate using a loop in c#

I am using Dictionary class as follows Dictionary dict = new Dictionary() { {"1", "One"} {"2", "Two"} {"3", "three"} {"4", "four"} }; Now I am trying to get the value of each of the keys and pass them as…
abc abc
  • 3
  • 2
  • 3
0
votes
2 answers

adding a before event to either an IDictionary or class

Is it possible to create an event before an item is added or updated to an IDictionary? public static IDictionary aircraftList = new Dictionary(); and I use it like this…
Adrian
  • 1,089
  • 24
  • 51
0
votes
2 answers

IDictionary of class displayed in a table c#

I have an IDictionary which holds an ever changing list of my class and I want to display the collection in a winforms UI probably using DataGridView or another control. I plan to have timer that refreshes the table every 1 to 2 seconds and a pause…
Adrian
  • 1,089
  • 24
  • 51
0
votes
2 answers

How to correctly implement the IDictionary interface and subclass from it

My goal is to have a dictionary that has unique keys and values, which I'm solving with an additional HashSet. I want to have a base class from which more specific types inherit from. As I have understood, the add-Method of the dictionary class is…
ShitakeOishii
  • 89
  • 2
  • 9
0
votes
1 answer

Mapping a related table into an IDictionary>

Say I have two tables, tblTestClass and tblTestClassRelated. Table tblTestClass has an Id column, and other stuff. Say table tblTestClassRelated has a TestClassId column, SomeGuid, SomeName and SomeValue columns. This mapping will load columns…
Remi Despres-Smyth
  • 4,173
  • 3
  • 36
  • 46
0
votes
1 answer

how do I return and use an IDictionary value from method

I'm having trouble figuring out the proper syntax for this.. I have a method like so: public IDictionary FindTransactions() { Dictionary returnItems = new Dictionary(); //do stuff return…
mdelvecchio
  • 567
  • 1
  • 5
  • 25
0
votes
0 answers

CSV file transposed to ILookup

A vendor is providing us a csv file nightly. We need to take that csv, pull out some of the columns, then import them into our in-house application. The csv, as we receive it, looks a bit like this: StudentId, GradYear, 2014 Thing1, 2014 Thing2,…
Jazzy
  • 519
  • 9
  • 31
0
votes
2 answers

ASP.Net MVC 2 - ModelBinding and Dictionary

In my interface I have a list of text boxes, something like this : http://screencast.com/t/YjIxNjUyNmU The number of textboxes is unknown as each of them is associated with a Template. In my page, the goal is to associate a number to some of those…
Mose
  • 1,781
  • 3
  • 16
  • 35
0
votes
1 answer

Binding Dictionary values to a DataGridView

I had a List(Of MyClass) as the DataSource for a DataGridView control, and this worked nicely. A column was automatically created for each public property in MyClass. I decided though that I wanted the List to be indexed by a string, so I changed…
Phil Preen
  • 589
  • 5
  • 20
0
votes
1 answer

C# Regex replace using Dictionary

I am looking for an option to replace multiple characters of a string in one go. I'm trying to pass a string as a parameter for a URL which has special characters like," /,+,(,),#". So I need to do some encoding. In one of SO questions I came…
damseldeebi
  • 137
  • 1
  • 16
0
votes
3 answers

In C#, how do I change a Key-Value-Property's value while recursively traversing an ExpandoObject?

The Problem Using C#, I need to traverse an object that has been cast to an ExpandoObject from XML and replace any "price" property with a new value. This object is very unstructured and has many layers of nested nodes (nested ExpandoObjects,…
Matt Cashatt
  • 23,490
  • 28
  • 78
  • 111
0
votes
1 answer

Fluent nHibernate and mapping IDictionary> how to?

I have problem with making mapping of classes with propert of type Dictionary and value in it of type Dictionary too, like this: public class Class1 { public virtual int Id { get; set; } public virtual IDictionary
szkra
  • 1,423
  • 2
  • 14
  • 21