Skip to main content
3 votes
3 answers
375 views

I am looking for some immutable collections in C#, specifically, a List/array type one, and a set/hashset type one. I'm clarifying if there are 'built in' .NET types that do what I want (I realize ...
matt's user avatar
  • 4,254
4 votes
1 answer
93 views

I have a function that is being repeatedly called via a thread. Randomly some times it raises this exception. System.InvalidOperationException: Collection was modified; enumeration operation may not ...
user27330175's user avatar
0 votes
0 answers
58 views

I've lost several days trying to debug an issue that boils down to this: Properties of type IImmutableDictionary can appear to be initialized in code but actually remain empty. Why is the compiler ...
Peter L's user avatar
  • 3,469
6 votes
2 answers
531 views

Is there a way to show a warning when you call ImmutableList<T>.Add but don't use its result? I thought CA1806 would do that, and it does for some methods that return results (like string....
fgsfds's user avatar
  • 687
2 votes
1 answer
113 views

I know it's not possible to cast derived lists (why not is nicely explained here), but what about ImmutableArrays as they cannot be changed casting should be valid, right? I would expect this to work: ...
DomenPigeon's user avatar
  • 1,207
0 votes
1 answer
105 views

I'm getting this error continuously Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" =>...
Linidu Praneeth Gunathilaka's user avatar
1 vote
2 answers
252 views

In the .NET Framework, there are interfaces for immutable dictionaries, lists, queues, sets, stacks. But there is no interface for immutable arrays to be found. Also, immutable arrays are implemented ...
aybe's user avatar
  • 16.8k
2 votes
2 answers
183 views

I'm trying to understand the exact difference between the 3 following methods of the ImmutableArray struct: the static method ImmutableArray<T>.CastUp<TDerived> the instance method ...
Enrico Massone's user avatar
2 votes
2 answers
271 views

I am looking to avoid multiple if-else conditions. Is there a more concise way of writing the below code? private Set<String> getValues(Optional<String> one, Optional<String> two) { ...
Punter Vicky's user avatar
  • 17.2k
0 votes
1 answer
1k views

What is the differences between ways of creating ImmutableList? List<int> numbers = new List<int>(){0, 1, 2, 3}; ImmutableList<int> immutableList = numbers.ToImmutableList(); ...
M.Jaskuski's user avatar
1 vote
1 answer
242 views

I'm trying to understand the functional programming paradigm so I'm playing around with an immutable linked list. I've created a Bag with some utility functions and now I want to iterate through the ...
MLeiria's user avatar
  • 623
0 votes
1 answer
75 views

Have a question about creating new objects using existing objects in python. Example: I want to implement immutable Stack using python. However, catch here is, whenever I am creating new object, it ...
Todd's user avatar
  • 3
1 vote
0 answers
702 views

I get the error above when I apply my UDF, which is defined as followed: import org.apache.spark.sql.functions.typedLit import org.apache.spark.sql.functions.udf def method_name(map:Map[String, Array[...
DateEngineer's user avatar
1 vote
2 answers
669 views

I need to implement an immutable collection which supports collection initialization syntax. The problem is in order to support collection initialization syntax, the collection must provide ...
Dmitry Kotleev's user avatar
0 votes
1 answer
598 views

In the thread When immutable collections are preferable then concurrent it is stated that immutable collections may be slower but they save memory. How is it possible if every change of immutable ...
helpME1986's user avatar
  • 1,053

15 30 50 per page
1
2 3 4 5
7