C# 8.0 ์์ ๋ฐ๋์
1. Defalut Interface ๊ฐ ์๊น
interface Test
{
void DefalutFunc()
{
.....
}
}
2. Using ๊ฐ์
using ๋ธ๋ญ ์ฌ์ฉ์ ๊ฐ์ ํ์ฌ ์๋์ ๊ฐ์ด ์ฌ์ฉ์ด ๊ฐ๋ฅํ๋ค
public static void Test
{
using FileSystem test = new FileSystem("text.txt",FileMode.CreateNew);
} // test Dispose
3. Nullable Reference
#nullable enable : ์ฐธ์กฐ ํ์ ๋ณ์๋ฅผ null ์ ๋์ ํ๋ฉด ๊ฒฝ๊ณ ๋ฅผ ๋ฐ์์ํจ๋ค. (#nullable disable : ์ฌ์ฉ์ํจ)
4. Null ๋ณํฉ ํ ๋น์
c# 6.0 null ๋ณํฉ ์ฐ์ฐ์
string s2 = s1 ?? "hello";
-> s1์ด null ์๋๋ฉด s1 ๋์ , null ์ด๋ฉด hello ๋ฆฌํด
c# 8.0 null ๋ณํฉ ๋์
s1 ??= "world" ;
-> if ( s1 == null ) s1 ="world";
'๐ฎ GAME & DEV > ํ๋ก๊ทธ๋๋ฐ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| Thread Pool (0) | 2020.06.02 |
|---|---|
| C# 8.0 Switch Expression (0) | 2020.06.01 |
| Index & Range (0) | 2020.05.26 |
| 2017 ์ธ๋ฆฌ์ผ ์๋ฐ ํ๋ฆฌ๋ฏธ์ (0) | 2017.10.31 |
| ์์ ์ ์ปดํจํฐ๊ฐ ๋์ผ ์ฝ์ด ์ด์์ด๋ผ๋ฉด... (0) | 2009.08.26 |