0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

完全自分用C#メモ

Last updated at Posted at 2014-02-23

C#のメモ
調べたものをメモする。


カレントディレクトリの取得

using System.IO;

した後、

string cd = Directory.GetCurrentDirectory();

で得られる。


配列(の例)

整数の配列

int[] x = {1,2,3,4,5,6,7,8};

数の変換

//文字列への変換
int num = 10;
string st = num.ToSring();
string st2 = Math.PI.ToSring();

//文字列からの変換
int num2 = int.Parse(st);

//int以外の型の数からintへの変換
int num2 = (int)Math.PI;


画像の扱い
画像はProperiesのリソースに登録

pictureBox1.Image = Properties.Resources.image_name;
// で取得
Color c = Properties.Resources.image_name.GetPixel(0,0);
// で色取得

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?