Evyr
Explore posts from servers✅ Struggling to use custom comparer with a list of KeyValuePairs
I'm trying to sort a list of keyvaluepairs on the key. I've defined an IComparer using Comparer.Create, but the list after sorting is identical to before. I can't use a SortedList because that requires unique keys.
The output looks like
Whereas I'd expect it to be sorted in either ascending or descending order.
7 replies
Is it possible to change the return type of interface method to the type of the implementing struct?
Say I have the following code:
I want to have GetBiggest return an instance of the struct its implemented within. This code obviously won't compile, but I'm wondering if there's a way to implement the intent behind it. I want to avoid returning object or IBiggerThan and then casting it wherever this method gets called, instead I want the return type to explicitly be that of the implementing struct. Is this possible, or am I missing something important?
5 replies
Looking for more performant alternatives to reflection for iterating through properties of a class
I've been using reflection to get the values of each of seventeen properties. I'm generating these values based off of an int seed passed to the constructor and trying to do so for the entire range of int values, so it'll an estimated 10 hours to complete. I was wondering if there were any more elegant solutions than writing out a "sum += <property>" for each property. Thanks!
5 replies
BROBattleBit Remastered Official
•Created by Evyr on 4/17/2024 in #help-support
Where are the crash reports actually generated?
3 replies