phaseshift
phaseshift
CC#
Created by MilkDog on 1/8/2025 in #help
Reccomendations for starter/intermediate c# projects
5 replies
CC#
Created by MilkDog on 1/8/2025 in #help
Reccomendations for starter/intermediate c# projects
ray tracer always a good one
5 replies
CC#
Created by Frite on 1/6/2025 in #help
✅ How to use the Visual Studio memory diagnostic
That in its own doesn't mean there is a leak
8 replies
CC#
Created by reproj2000 on 12/30/2024 in #help
what type of pattern would u use?
Flyweight pattern might apply here
4 replies
CC#
Created by Get on 12/31/2024 in #help
PersistedAssemblyBuilder to generate executable
If you try clicking the exe in explorer to run it it might give more details in the error message if it's really a dll load issue
19 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
👍
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
It would change the name, yes it needs to match everywhere. You dont need to change it
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
it doesnt do anything, just convention
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
BitBoard _bitboard = new(); it's what I'm calling that where the init is 'inline' with the member declaration
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
If BitBoard has constructor arguments then add them into new(...)
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
you can either let null be a valid state for it (not suggested) by changing the type to BitBoard?, or you can init it inline, BitBoard _bitboard = new();, or you can do similar in a constructor
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
yeah, structs are always non-null
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
(a member that is a class type)
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
So class members dont get default init'd to any specific value. They stay as null unless to write code otherwise
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
since it's readonly you must init it with the correct data to start with
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
And does it have a non-default ctor?
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
what are the members of BitBoard?
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
It's not clear to me which struct you are referencing when saying a struct is allowed
42 replies
CC#
Created by ElectricTortoise on 12/20/2024 in #help
Why is the struct allowed but the class isn't?
you need to init the struct
42 replies