Help us understand the problem. What is going on with this article?

完全自分用C#メモ

More than 5 years have passed since last update.

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);
// で色取得

DoG_peer
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした