Re: C# When to use boxing?

2020-01-08 Thread AudioGames . net Forum — Developers room : Alan via Audiogames-reflector


  


Re: C# When to use boxing?

Hey!Just one more thing: sometimes boxing can be confused with polimorphism, both concepts share the same sintax usually, so if you create a class that implements two interfaces, iupdateable and ipositionable, you can use this class like its own, like an iupdateable or like an ipositionable item. In this case, you use the same sintax: ipositionable pos = (ipositionable) myPolimorphicObject1;Hope it helps.

URL: https://forum.audiogames.net/post/491270/#p491270




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: C# When to use boxing?

2020-01-08 Thread AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector


  


Re: C# When to use boxing?

Oh, thank you!I get it now.

URL: https://forum.audiogames.net/post/491257/#p491257




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: C# When to use boxing?

2020-01-07 Thread AudioGames . net Forum — Developers room : Alan via Audiogames-reflector


  


Re: C# When to use boxing?

Hi there,Boxing and unboxing are fully supported in c sharp. It is not used so often as before but still useful.Imagine you have developed a system that can store objects, for serialization or whatever reason, and you want to store two things: an instance of the class gameobject and an integer. No problem, your system can handle the first one because it's a class instance, ence an object, but you cannot do the same with an integer like: int num = 30, unless you apply boxing. so, box num into an object and you are ready to go, any function that accepts an object as a parameter will work with your boxed num.hope it helps, excuse my english and my mobile keyboard, please 

URL: https://forum.audiogames.net/post/491152/#p491152




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: C# When to use boxing?

2020-01-04 Thread AudioGames . net Forum — Developers room : francipvb via Audiogames-reflector


  


Re: C# When to use boxing?

Hello,There is no boxing feature like in java in .net. All number types are in-memory native structures with some code additions to operate on them.Cheers,

URL: https://forum.audiogames.net/post/490661/#p490661




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


C# When to use boxing?

2020-01-04 Thread AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector


  


C# When to use boxing?

Hello! What is the good way to use boxing? Is there any need for the feature?

URL: https://forum.audiogames.net/post/490547/#p490547




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector