Izagawd
Izagawd
Explore posts from servers
CC#
Created by ChezZ on 8/1/2024 in #help
Question regarding thread safety
if there are parts of the method you dont want to be executed in multiple threads, you can use lock
10 replies
CC#
Created by ChezZ on 8/1/2024 in #help
Question regarding thread safety
it will still execute from multiple threads, i believe.
10 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
removing the need to type new() makes it feel 10x better for some reason :kekw:
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
you can also plop it in a method
public void SomeMethod(List<int> idk){}



SomeMethod([1,2,3,4]);
public void SomeMethod(List<int> idk){}



SomeMethod([1,2,3,4]);
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
it doesnt only work for list. it works for every type that implements from IEnumerable<T>
int[] a = [1,2,3,4];
HashSet<SomeClass> b = [new SomeClass(), new SomeClass()]
int[] a = [1,2,3,4];
HashSet<SomeClass> b = [new SomeClass(), new SomeClass()]
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
u need to have c# 12 for this though
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
why cant you just do
queryResult.FirstOrDefault();
queryResult.FirstOrDefault();
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
you want to make one result into a list? why? what way? is there something im missing
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
what do you intend to do with the boxes
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
yh this works. unless its not what you are looking for?
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
can I see an example of its use case in your code?
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
though I have a question. what areas would you need to make a list of type T via reflection? I want to see if theres a better way
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
i see. so you wanted to make it from reflection.
53 replies
CC#
Created by Akatu 𖣂 on 7/30/2024 in #help
✅ hi, im trying to download an open source, im really new to this, and i need help with some errors
discord remembers all...
20 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
if its not what you are looking for, then please can you provide more details?
53 replies
CC#
Created by {sus} on 7/30/2024 in #help
Making a List<T> from an instance of T without knowing T
im not sure what you are looking for exactly, but this is the answer I assume you would want something like
public static List<T> MakeListFrom<T>(){
return new List<T>();
}
public static List<T> MakeListFrom<T>(){
return new List<T>();
}
Since i assume you are working with generics?
53 replies
CC#
Created by Izagawd on 10/8/2023 in #help
✅ Mutate multiple images at once (sixlabors)
thx!
4 replies
CC#
Created by Izagawd on 7/10/2023 in #help
✅ image cropping with sixlabors
oh shit its now im seeing this xD
9 replies
CC#
Created by Izagawd on 9/30/2023 in #help
✅ public static async Task Main instead of public static void Main for dsharpplus setup?
ill use async Task Main to look more professional 🗿
11 replies
CC#
Created by Izagawd on 9/30/2023 in #help
✅ public static async Task Main instead of public static void Main for dsharpplus setup?
alright
11 replies