Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

@DoG_peer

完全自分用C#メモ

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

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
0
Help us understand the problem. What are the problem?