AlkalineLemon
AlkalineLemon
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
yup that makes sense
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
it's an error because its two interface instances being multiplied, not two instances of a type that implements IMultiplyOperators
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
oh i see, i cant call the operator on the interface objects
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
yes that makes sense, there's only one * operator(its not associated with int instances, im probably saying this weirdly) for the entire int type
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
it gives an error saying that * can't be used on operands of type IMultiplyOperators<int, int, int>
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
No description
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
i didnt even know what boxing/unboxing was a few minutes ago thanks for the explanation
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
ive already learned quite a lot
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
its fine
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
its confusing
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
from what im getting, you can do all of the stuff that the interface implements on the boxed int?
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
yeah, IAdditionOperators<> just forces you to implement an overload for the '+'
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
without unboxing
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
if an int gets boxed as an interface, how can i read or do stuff on it?
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
and then you'd have to unbox it by type casting
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
oh
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
can you make instances of an interface? how does this Compare function even work?
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
if your generic type implements the IAdditionOperators<> interface, i then you can add them with the + operator
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
and when you want to get the value type back, you have to take it out of the object i can see that adding a ton of overhead
126 replies
CC#
Created by Faker on 1/30/2025 in #help
What is meant by "Generic" and where do we use them and why are they important
so, to store a value type in a reference type(like object). You have to put your value type in the
object
object
126 replies