๐ŸŽฎ Unity Study/C#

[C#] Boxing, Unboxing -> Generic

ibelieveinme 2023. 9. 8. 11:00
728x90

https://learn.microsoft.com/ko-kr/dotnet/csharp/programming-guide/types/boxing-and-unboxing

 

Boxing ๋ฐ Unboxing - C# ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ฐ€์ด๋“œ - C#

C# ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ boxing ๋ฐ unboxing์— ๋Œ€ํ•ด ์•Œ์•„๋ด…๋‹ˆ๋‹ค. ์ฝ”๋“œ ์˜ˆ์ œ๋ฅผ ์‚ดํŽด๋ณด๊ณ  ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ถ”๊ฐ€ ๋ฆฌ์†Œ์Šค๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

learn.microsoft.com

 

 

https://yeko90.tistory.com/entry/c-%EB%B0%95%EC%8B%B1-%EC%96%B8%EB%B0%95%EC%8B%B1-%EA%B0%9C%EB%85%90

 

[c#] ๋ฐ•์‹ฑ(boxing), ์–ธ๋ฐ•์‹ฑ(unboxing) ๊ฐœ๋…๊ณผ ์‚ฌ์šฉ ์ด์œ 

๊ธฐ์กด์— ํƒ€์ž…์„ ๋ณ€ํ™˜ํ•˜๋Š”๊ฒƒ์„ ํ˜•๋ณ€ํ™˜(type casting)์ด๋ผ๊ณ  ํ–ˆ์—ˆ์Šต๋‹ˆ๋‹ค. (ํ˜•๋ณ€ํ™˜์€ ๊ด€๋ จ ํฌ์ŠคํŒ… ์ฐธ์กฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.) ๋ฐ•์‹ฑ๊ณผ, ์–ธ๋ฐ•์‹ฑ๋„ ํ˜•๋ณ€ํ™˜์„ ํ•˜๋Š”๊ฒƒ์ด์ง€๋งŒ ์กฐ๊ธˆ ๊ฒฐ์ด ๋‹ค๋ฅธ๋ฐ์š”. 1. ๋ฐ•์‹ฑ๊ณผ ์–ธ๋ฐ•์‹ฑ์ด๋ž€?

yeko90.tistory.com

 

728x90

'๐ŸŽฎ Unity Study > C#' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[C#] using ๋ฌธ  (0) 2023.12.13
[Unity][๋””์ž์ธ ํŒจํ„ด] Builder Pattern(๋นŒ๋” ํŒจํ„ด)  (0) 2023.09.21
C# & Unity Code Convention  (0) 2023.08.29
[C#] Generic, Template  (0) 2023.08.21
[C#] ๋ฌธ๋ฒ• Keyword  (0) 2023.08.19