Skip to main content
0 votes
3 answers
753 views

I have a case where I have to find out if element belongs to a list or not in loop. The straight forward way to do this is to call the Any method of the list, like this public class Person { ...
Pawan Nogariya's user avatar
0 votes
2 answers
519 views

if (!this._contextAccessor.HttpContext?.Request.RouteValues.TryGetValue("requiredId", out var idRouteParam) ?? true) return Task.CompletedTask; var id = (int)idRouteParam; I ...
Mufasatheking's user avatar
2 votes
1 answer
7k views

I have a dictionary like this: Dictionary<string, List<string>> mydict = new Dictionary<string, List<string>>(); I have tried: foreach(var value in mydict.Keys) { List<...
Sean Davis's user avatar
0 votes
1 answer
480 views

I am creating an Excel file using Open XML SDK. In this process, I have a scenario like below. I need to add data into a Dictionary<uint, string> if key is not exists. For that I am using below ...
Bishan's user avatar
  • 15.9k
1 vote
2 answers
3k views

I am trying to use TryGetValue on a Dictionary as usual, like this code below: Response.Context.Skills[MAIN_SKILL].UserDefined.TryGetValue("action", out var actionObj) My problem is the ...
Alexandre Paiva's user avatar
1 vote
2 answers
926 views

Goal: get a value from a dictionary. Said value has a dictionary as a key. What I'm doing: I'm creating a second dictionary that has the exact same values as the key whose value I'm trying to get. ...
Aziz's user avatar
  • 11
0 votes
0 answers
31 views

I have dictionary based on a custom class. I am facing issues with overriding the GetHashCode() while inheriting IEquatable interface. My class object has three properties: Id1 (string) Id2 (string) ...
Sahil Gupta's user avatar
0 votes
1 answer
37 views

I'm trying to use Dictionary.TryGetValue() to search a dictionary for a username and password hash, if it matches authenticate the user, if not do something else. The problem I'm having is that ...
steve51516's user avatar
0 votes
2 answers
157 views

Below are two classes Deck and Card. these are being used for a blackjack game and therefore i am trying to get the values of the cards. the values are currently stored in an enum, however i cannot ...
Pyson's user avatar
  • 57
0 votes
0 answers
272 views

I have the below Extension (not mine, borrowed for my implementation, but altered a bit) and I am wondering why is the TryGetValue below failing, despite the fact the the pair (string, object - well, ...
Nick's user avatar
  • 533
-4 votes
1 answer
1k views

I have an IDictionary object , my question is how I can read data by key? It looks easier question but there is no method (even similiar one is not found) like TryGetValue . Only Contains method ...
Ozmen's user avatar
  • 139
1 vote
1 answer
1k views

I am trying to get the value from Dictionary(JSON deserialized) and parse it as long. When I quick viewed the variable I found there is no "M" as part of the out parameter a s given below But when I ...
Gopi's user avatar
  • 5,917
-1 votes
2 answers
3k views

How can I take the value of: <span name="MinPrice" class="irs-from">0</span> <span name="MaxPrice" class="irs-to">0</span> And assign them to PHP variables: $MinPrice $...
stivan viktorov's user avatar
1 vote
1 answer
266 views

The most cumbersome piece of syntax I need to continually write is lazily initializing a container in a dictionary like: ContainerRecord value; if(!_dictionary.TryGetValue(key,out value)) { value =...
Spencer Rose's user avatar
  • 1,240
0 votes
2 answers
634 views

Below is the div which i am trying to show in a popup. How do i get the td value from the popup. When trying to call the popupClick(). it returns undefined. I have attached the code below. Thanks in ...
karthisena's user avatar

15 30 50 per page