Skip to main content

All Questions

Tagged with
3 votes
1 answer
47 views

Using Exists with a Predicate<T> on a list with null items

I'm trying to find the index of an item in a list with something like listx.FindIndex(SomePredicate<T>) but I get an error NullReferenceException: Object reference not set to an instance of ...
Elight's user avatar
  • 33
0 votes
0 answers
44 views

Finding a specific value in WindowsForms ListView via FindItemWithText, but method having some troubles with numbers

I have a ListView named lst_Employees and have combined 2 ComboBoxes named cmb_EmployeeID and cmb_EmployeeName. When I choose someone from cmb_EmployeeName, the cmb_EmployeeID's selected index change ...
Cooper's user avatar
  • 31
0 votes
1 answer
69 views

How do I create an auto coloring algorithm for my game?

I'm working on a game where you can draw and color pictures. The coloring part basically works as a 2d-array with quadrants of a picture. These quadrants can be either empty, unvisited or visited. I ...
Vadim's user avatar
  • 3
0 votes
2 answers
79 views

How to find element in one of two lists

I can search a list, I was using this: if (!mylist.Any(item => item.Thing == searchitem)) { var myvar = mylist.Find(item => item.Thing == searchitem); } However, there's a ...
SpaghettiWestern's user avatar
0 votes
0 answers
115 views

Run "Find" (ctrl + F) in Google Chrome using C#

I'm trying to make an app, which could open a pdf file in a browser (Chrome) and search for a certain word automatically. However, I can't find anything about passing commands to Google from C# ...
Martin Míča's user avatar
0 votes
1 answer
321 views

Unity findgameobjectswithtag still finds destroyed items

In my unity program i have two function who runs in an Update() function. In one of the functions, if a conditition is met an object will be destroyed. The problem occurs when because the other ...
Sho Boi's user avatar
0 votes
1 answer
157 views

C#: Group subdirectories by their parent directory and sort by creation time to get the newest

In my directory hierarchy, I do not know how deep each directory matches a name pattern (for example: "*_select"), so I look for all subdirectories with that specific pattern. So, for a ...
Erelephant's user avatar
0 votes
0 answers
464 views

Use Rows.Find to Search DataTable for String Value

I have a bit of code that I'm stuck on. I am trying to search the ReasonCodeTable for some values in the DataRow from R64CodeTable so that I can update it. Find(_rcdr["Reason Code"]) Works ...
Dizzy49's user avatar
  • 1,498
0 votes
1 answer
779 views

find and replace text in the entire document including headers

Document example (Opens correctly in MS Office) I have a Word document 1 where I need to replace all tags <> in the text with my values. Using the interop, I got access to the main text and the ...
Badunsutra's user avatar
0 votes
0 answers
846 views

Find all the index from an array whose sum value is equal to n

So, I needed to find all the index of elements from an array whose sum is equal to N. For example : Here I want to find indexes whose sum should be equal to 10. Input : int[] arr = { 2, 3, 0, 5, 7 } ...
Sarfaraz Ansari's user avatar
0 votes
0 answers
86 views

c# find the same numbers in each column in a 2d matrix

So, I have this task where I have to find the competitors who won in a tie. Basically the input is a txt file, which has the number of competitors and the number of competitions in it's first row. The ...
Gergő Szatmári's user avatar
0 votes
1 answer
182 views

How to count occurences of a specific word in MS Word document

I want to search how many times a specific word exists in a MS word file. I tried a loop on docs.Words, but it takes so much time... In the search options there in an option "Find in -> Main ...
HaggayF's user avatar
  • 23
0 votes
2 answers
374 views

Find in the List of words with letters in certain positions

I'm doing a crossword puzzle maker. The user selects cells for words, and the program compiles a crossword puzzle from the dictionary (all words which can be used in the crossword) - List<string>...
Nizhgo's user avatar
  • 13
-1 votes
1 answer
74 views

Finding dynamically generated components Unity

I have a game object and I'm generating a component for that object by var arcGISMapViewComponent = gameObject.AddComponent<ArcGISMapViewComponent>(); under the Void Start() However, I have ...
Çağatay Konuklar's user avatar
-1 votes
3 answers
407 views

Find() Null vs Empty List condition

I have a Find() statement like so: MyObject obj = existingObjs.Find(x => x.listA == currentObj.listA && x.listB == currentObj.listB); Unfortunately ...
Jeremy P's user avatar
  • 1,407

15 30 50 per page
1
2 3 4 5
20