Questions tagged [keyvaluepair]

Defines a key/value pair that can be set or retrieved.

Defines a key/value pair that can be set or retrieved. The most common key/value pair used is HTTP GET paramaters which take the form of:

key1=value1&key2=value2&key3=value3

This syntax makes this type of storage very open-ended as you continue to append the next key/value pair to the end of the string.


In the mscorlib library (from MSDN)

Namespace: System.Collections.Generic

Type Parameters

TKey

The type of the key.

TValue

The type of the value.

Read more and view examples at MSDN

440 questions
1
vote
0 answers

How to store and retrieve multiple tables data into key value pair?

I am working on a requirement where product needs a flexibility to add Lists of multiple number of columns. I am trying to fit data in data model with the help of key value pair. For example - I have a list Allergy which will have 3 columns…
1
vote
2 answers

How to parse pipe-separated Attribute=Values pairs?

I have string b="Name=Paul Roberts|Telephone=|Address=|City=LA"; I have been trying all day to get the output Attribute-Value pairs without equal and pipes signs. I have more then 4 results but this is what I want to achieve: Output (separate each…
ja jaaaa
  • 115
  • 4
  • 15
1
vote
5 answers

Getting multiple substrings from single string C#

I'm using a string to represent name/value pairs in an image filename. string pairs = image_attribs(color,purple;size,large).jpg; I need to parse that string to get the name/value pairs from before and after the semicolon. I can split on the…
natep
  • 126
  • 4
  • 13
1
vote
1 answer

Sending KeyValuePair from AJAX to Wcf Service

I use AJAX & WCF and I want to send an array of KeyValuePair: Array that is in Service(that is in a particular class): [DataMember] public KeyValuePair[] WorkDays { get; set; } CustomDay.cs: [DataContract] public class…
Hodaya Shalom
  • 4,327
  • 12
  • 57
  • 111
1
vote
1 answer

ComboBox KeyValuePair not getting values properly

/**Dictionary looks like this *[PERCENTAGELOSS, 0] *[THRESHOLD, 1] *etc. */ Dictionary allEnums = XMLHandling.getEnums(enumCognityName); foreach (KeyValuePair item in allEnums) { …
Schadenfreude
  • 1,522
  • 1
  • 20
  • 41
1
vote
2 answers

C# Get dictionary first keys of duplicated values

I've got the following Dictionary: Dictionary myDict = new Dictionary(); myDict.Add(0, 6); myDict.Add(1, 10); myDict.Add(2, 6); myDict.Add(3, 14); myDict.Add(4, 10); myDict.Add(5, 10); I already know how to get all the…
Kevin Cruijssen
  • 9,153
  • 9
  • 61
  • 135
1
vote
2 answers

Select KeyValuePair in a ComboBox with Key

I have several KeyValuePair in a combobx. this.cbEndQtr.Items.Clear(); this.cbEndQtr.Items.Add(new KeyValuePair(1, "Test1")); this.cbEndQtr.Items.Add(new KeyValuePair(2, "Test2")); What's the simplest way to select the by…
user2308890
1
vote
3 answers

absence of value in javascript (undefined)

I have list of objects with key value & pair.when I am separating those to display each information on a specific field . I am getting type error data.validation[i].user is undefined But I have checked the variables have been assigned a value. var…
1
vote
1 answer

How do i add a name: value pair to an existing mysql stored json object

how do i add the new attribute to a json object i have stored in a mysql table column? now i have json_encode data stored like: "1":{"lastname":"blah","firstname":"R.A.","function":"Manager","email":"test@hotmail.com","barcode":"33432799181"} …
alex
  • 4,804
  • 14
  • 51
  • 86
1
vote
1 answer

Iterate through updating F# Map vs a C# Dictionary

I have a collection of key/value pairs contained inside an F# Map type node = {myFloat:float, data1:int; data2:int;} type nodesCollection = {metaData:int nodes:Map} let results = processData (nodes:Map) The function…
Chris Tarn
  • 629
  • 5
  • 15
1
vote
0 answers

How to send array to server using name value pair in android

In my Android application, I need to send following JSON array to server using name value pair. This is the following json response and I need to send insertedIDs array to the sever. { "message": "Deal was successfully done", "insertedIDs":…
M.A.Murali
  • 9,988
  • 36
  • 105
  • 182
1
vote
2 answers

how to set only one value to KeyValuePair for chart wpf?

I need to read values for chart from KeyValuePair but i want show only one axes values (y) for some points, so i tried add null at first parameter but chart can not be showed . What i can do? Thanks.
Sejn
  • 63
  • 10
1
vote
2 answers

Bind to the "value" of ObservableCollection>

I want to bind my combo box ItemsSourse to the "value" i.e. (string component) of the ObservableCollection>. How can I do that?
aromore
  • 977
  • 2
  • 10
  • 25
1
vote
0 answers

Cannot resolve Uri.path, clash between relative and absolute paths

I have the following code I can't get to work right: KeyValuePair item = (KeyValuePair)e.AddedItems[0]; string str = (string)item.Key; switch (str) { case "?": …
eaavendano
  • 77
  • 7
1
vote
4 answers

Arrays with Objects as Key Values in Javascript

I have the following requirement. I have a pair of integers which is to act as keys and another pair of integers which should act as values. That is: obj[{key1:12,key2:23}]=[2,3]; obj[{key1:12,key2:22}]=[4,3]; obj[{key1:34,key2:12}]=[4,33]; Also…
rajaditya_m
  • 289
  • 1
  • 4
  • 14