๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ‘จ๐Ÿผ‍๐Ÿ’ป๊ฐœ๋ฐœ/C#

C# - ์„ค์ • ๊ฐ’ ๋ฐฐ์—ด(array) ํ˜•ํƒœ๋กœ ์ €์žฅํ•˜๊ณ  ๋ถˆ๋Ÿฌ์˜ค๊ธฐ

by Janger 2023. 2. 1.
728x90
๋ฐ˜์‘ํ˜•

 

์ €์žฅํ•˜๊ธฐ
string value = String.Join(",", intArray.Select(i => i.ToString()).ToArray());
Properties.Settings.Default.option_array = value;
Properties.Settings.Default.Save();

 

๋ถˆ๋Ÿฌ์˜ค๊ธฐ
int[] arr = Properties.Settings.Default.option_array.Split(',').Select(s => Int32.Parse(s)).ToArray();

 

 

์ถœ์ฒ˜: 

https://stackoverflow.com/questions/1766610/how-to-store-int-array-in-application-settings

 

How to store int[] array in application Settings

I'm creating a simple windows Forms application using C# express 2008. I'm an experienced C++ developer, but I am pretty much brand new to C# and .NET. I'm currently storing some of my simple

stackoverflow.com

 

728x90
๋ฐ˜์‘ํ˜•