.NETプログラミング
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
] [
Twitter
]
開始行:
→[[C#関連]]
#contents
*WPF [#w32e299b]
-[[Windows Presentation Foundation - WPF .NET Framework |...
-[[WPF の概要 | Microsoft Learn>https://learn.microsoft.c...
-[[チュートリアル - WPF .NET Framework | Microsoft Learn>...
-[[WPF入門>http://www.atmarkit.co.jp/fdotnet/chushin/intr...
*.NET Tips & Tutorial Web [#vf533357]
-[[【C#】逆コンパイルと難読化について【.NET】 - Qiita>htt...
-https://referencesource.microsoft.com/
-http://ja.gotdotnet.com/quickstart/howto/
-[[Some Cool Tips for .NET:http://www.codeproject.com/use...
-[[@ITの.NET TIPS:http://www.atmarkit.co.jp/fdotnet/dotne...
-[[.NETのつぼ:http://park16.wakwak.com/~mimi/dotnet/top.h...
-[[じゃんぬねっと:http://jeanne.wankuma.com/]]
-[[DOBON.NET:http://dobon.net/]]
-[[Mick Dohertys DotNet TIPS:http://dotnetrix.co.uk/]]
-[[30 minutes Regex Tutorial:http://www.codeproject.com/d...
-.NETでの正規表現については正規表現のページを参照
*テーマ別ページ [#tc5af770]
-.NETでの文字列処理
-FlexGrid.NET関連
-.NET フォーム関連
-.NET コントロール関連
-.NET ファイルシステム関連
-C#によるExcel制御
-ADO.NET関連
-ASP.NET関連
-.NETネットワークプログラミング
-.NETによるWindowsサービスの開発メモ
-[[PINVOKE.NET:http://www.pinvoke.net/]]
--[[PINVOKE.NET Add-In for Visual Studio:http://www.gotdo...
*一般 [#oc58fb17]
-[[WPFのGridを動的に作成する #C# - Qiita>https://qiita.co...
-[[Windows 8時代にWPFとSilverlightはどちらが生き残れるの...
--今後はSilverlightよりもWPFを選択するケースがこれまでよ...
--Silverlightは徐々にクロスプラットフォームをあきらめてい...
--マイクロソフトが「本当の意味でのクロスプラットフォーム...
--Silverlightの居場所は徐々に業務向けに偏ってくるのではな...
--現在、Windowsプラットフォーム上の業務アプリケーションで...
-[[いま使うべき、学ぶべき.NETテクノロジはどれ?>http://ww...
--遠藤 実際の現場において、やはりWPFは使われていないので...
--宮崎 実際の現場を見ていても、WPFはまだまだ少ないですね...
--さらにWPFが有利な点として、WPFのスキルを身に付けると、...
-[[他のメモリが壊れている…>http://www.atmarkit.co.jp/bbs/...
保護されているメモリに読み取りまたは書き込み操作を行おう...
他のメモリが壊れていることが考えられます。
--メモリアクセスバイオレーションが起きたときの例外メッセ...
--C#側でunsafeなことをしてないのに起きる場合はODBCやDAOな...
-[[イベントログにエントリを書き込む>http://dobon.net/vb/d...
-[[app.configには2つの用途がある>http://d.hatena.ne.jp/P...
-[[.NET開発者のためのDI&AOP入門>http://www.atmarkit.co.jp...
-コンピュータ名取得
System.Environment.MachineName
-[[5分でわかるActive Reports>http://codezine.jp/a/articl...
-[[Windowsメッセージで文字列を渡す>http://www.codeproject...
-[[Automating Undo/Redo with .NET Generics>http://www.cod...
-[[DEVPATH を使用してアセンブリを指定する:http://msdn2.mi...
--厳密名をつけたDLLの開発をする時などに知っておくと便利な話
開発時に、グローバル アセンブリ キャッシュにアセンブリを...
アセンブリのビルド出力ディレクトリを指す DEVPATH 環境変...
-ある色が明るい色か暗い色か判定したいとき:Color.GetBrigh...
-[[.NETアプリを軽快にするためのGC講座>http://www.atmarkit...
-[[Quick Introduction to PerlNET>http://www.codeproject.c...
-[[Using managed code to detect what .NET Framework versi...
-[[.NET Object Spy and InvokeRemote>http://www.codeprojec...
-[[Setting Enum's Through Reflection:http://www.codeproje...
-[[C#グローバライズ サンプル:http://www.codeproject.com/u...
-[[.NET Internationalization: The Developer's Guide to Bu...
-[[Mixing Managed and Unmanaged Code Using Managed C++:ht...
-[[リソースに画像を持たせて使う方法:http://www.microsoft....
-[[クリップボードの利用:http://www.microsoft.com/japan/ms...
-[[.NET Frameworkのバージョン確認方法:http://www.atmarkit...
-[[アセンブリ署名とコードアクセスセキュリティ:http://code...
--メリット1:参照DLLが変わっていないことを証明する
--メリット2:GACに登録することができるようになる
--メリット3:コードアクセスセキュリティで厳密名による設定...
-[[A Windows Explorer in a user control:http://www.codepr...
-[[キーボードフック:http://www.codeproject.com/useritems/...
-[[Processing Global Mouse and Keyboard Hooks in C#:http:...
-[[ハッシュテーブルを使うには?:http://www.atmarkit.co.jp...
--[[ハッシュをArrayListにコピーしてソートするやり方:http:...
-[[システムトレイにアラーム時計を作るサンプル:http://www....
-[[.NET system wide hotkey component:http://www.codeproje...
-[[DotLucene:http://www.dotlucene.net/]]
--オープンソースの全テキストサーチライブラリ.NET用
-[[リソースに埋め込んだデータを利用する:http://dobon.net/...
-[[アプリケーションアイコンの設定:http://www.atmarkit.co....
-[[.NET File Format:http://www.codeproject.com/dotnet/dot...
-[[日付の計算のサンプル:http://www.atmarkit.co.jp/fdotnet...
--DateTime, TimeSpanなどの扱い
-[[.NETパフォーマンスUPのためのコードレビュー@MSDN:http:/...
-[[サービス名の列挙:http://www.atmarkit.co.jp/fdotnet/dot...
*特定の処理にタイムアウトを実装するには [#s4cafcdc]
-http://bbs.wankuma.com/index.cgi?mode=al2&namber=9308&KL...
-スレッドを起こすか、非同期デリゲートを使う
*Application.DoEvents()の注意点 [#i01eaf96]
-ループの中で画面更新するためにDoEvents()を呼ぶ場合、メッ...
-かならずウィンドウズメッセージが何かポストされている状態...
*プロセスで使っているメモリの大きさなど [#xffb9926]
-このへんをヘルプで参照
--System.Diagnostics.Process.PagedMemorySize
--System.Diagnostics.Process.PeakPagedMemorySize
--System.Diagnostics.Process.PeakWorkingSet
--System.Diagnostics.Process.WorkingSet
*簡単な処理時間計測用クラス [#qe633af0]
class ProfTime
{
bool bInProf = false;
long m_start;
long m_end;
public void Start()
{
Debug.Assert(bInProf == false);
m_start = DateTime.Now.Ticks;
bInProf = true;
}
public void End()
{
Debug.Assert(bInProf);
m_end = DateTime.Now.Ticks;
bInProf = false;
}
public long GetErapsed()
{
Debug.Assert(bInProf == false);
//Debug.Assert(m_end != m_start);
return (m_end - m_start)/10000;
}
public double GetErapsedD()
{
Debug.Assert(bInProf == false);
//Debug.Assert(m_end != m_start);
double d = (m_end - m_start);
return d/10000;
}
public void End(string msg)
{
End();
Log.OutLog("PRF:" + msg + "所要時間:" + GetErapsed()...
}
}
-使い方の例
ProfTime p = new ProfTime();
p.Start();
//計測したい処理
p.End("ほげほげ処理");
etime = p.GetErapsed();
*アイドルイベントの使い方 [#i7f14720]
-FormではなくApplicationのイベントである点に注意
//適当なところにこれを入れる
Application.Idle += new EventHandler(IdleHandler);
//アイドルイベントハンドラ
void IdleHandler(Object obj, EventArgs args)
{
//一回だけでやめたい場合
Application.Idle -= new EventHandler(IdleHandler);
//適当に何かやる
}
*IEnumeratorの実装例 [#a4ea9cb8]
-これを実装すると何がうれしいかというと、foreach文の対象...
class SyokenInfoEnumelator : IEnumerator
{
ArrayList mAry;
int idx;
public SyokenInfoEnumelator(ArrayList a)
{
mAry = a;
Reset();
}
public object Current
{
get
{
Debug.Assert(mAry != null);
Debug.Assert(0 <= idx && idx < mAry.Count );
return mAry[idx];
}
}
public bool MoveNext()
{
if( mAry.Count <= 0)
return false;
else if( idx < mAry.Count )
return ++idx < mAry.Count; //ここがちょっとやや...
else
return false;
}
public void Reset()
{
idx = -1;
}
}
-[[参考:IEnumeratorとyieldキーワード>http://wisdom.sakur...
*リソースに埋めたテキストデータの取得 [#a3be5681]
/// <summary>
/// リソースからテキストを取ってくる
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
String getResourceTxt(String name)
{
try
{
System.Reflection.Assembly myAssembly = System.Reflect...
System.IO.StreamReader sr =
new System.IO.StreamReader(
myAssembly.GetManifestResourceStream(name),
System.Text.Encoding.GetEncoding("shift-jis"));
//内容を読み込む
String s = "";
s = sr.ReadToEnd();
/*
// 改行を取りたければこうする。
String ws;
do
{
ws = sr.ReadLine();
s += ws + " ";
}while( ws != null);
*/
//後始末
sr.Close();
return s;
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
Debug.Assert(false);
return "";
}
}
-このとき指定するnameは<モジュール名>.<サブフォルダ名>.<...
--nameを確認したければReflectorなどを使ってリソースのとこ...
-コンパイルするときにテキストファイルのプロパティの「ビル...
*Updaterサンプル [#z9b6b872]
-http://www.codeproject.com/tools/updater.asp
*二重起動チェック [#fa2d853f]
public static bool ChkDblProcess()
{
Process p = Process.GetCurrentProcess();
Process[] procs = Process.GetProcessesByName(p.Process...
foreach (Process wp in procs)
{
if (wp.Id != p.Id)
{
Log.Log_Write(LogType.ERROR, "同じプロセスが既に起...
return false;
}
}
return true; //OK
}
*二重起動チェックして起動してたら前出し [#wfd016b6]
-http://jeanne.wankuma.com/tips/process/activewindow.html
*二重起動チェックでパフォーマンスカウンタが使えないという...
二重起動チェックで以下のようにしている場合
If (UBound(Diagnostics.Process.GetProcessesByName _
(Diagnostics.Process.GetCurrentProcess.ProcessName))...
Exit Sub
End If
以下のようなメッセージを伴う例外が発生することがある。
プロセス パフォーマンス カウンタは無効にされているため、...
これは以下のレジストリキーが1になっていると起こるらしい。
HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Pe...
パフォーマンスカウンタが無効になり、上記の部分でInvalidOp...
-[[参考URL:http://www.atmarkit.co.jp/bbs/phpBB/viewtopic....
*.NETとCOM [#ha3e86ca]
-[[Understanding Classic COM Interoperability With .NET A...
-[[COM and .NET Interoperability>http://www.theserverside...
*他プロセス起動の例 [#cae62dfe]
using System.Diagnostics;
...
Process myProcess = new Process();
myProcess.StartInfo.FileName = "notepad.exe";
myProcess.StartInfo.Arguments = "";
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Nor...
myProcess.Start();
myProcess.WaitForExit();
*スレッド [#i5234c04]
-[[Visual C++でマルチスレッド・プログラミング>http://www....
-スレッドID取得
System.AppDomain.GetCurrentThreadId()
を使うのは古い仕様なので
Thread.CurrentThread.ManagedThreadId;
を参照
-[[スレッドの実行と同期@CodeZine>http://codezine.jp/a/art...
--[[非同期デリゲートとスレッドプール>http://codezine.jp/a...
-[[C#によるマルチスレッド>http://ufcpp.net/study/csharp/s...
-[[How to solve "Cross thread operation not valid">http:/...
-[[BackgroundWorkerコンポーネントの説明:http://www.atmark...
-[[.NETによるマルチスレッド解説@IT:http://www.atmarkit.co...
-[[.NET マルチスレッドプログラミングbyDOBON:http://codezi...
*コマンドライン引数を使いたい場合 [#a3166b0b]
-Main()の引数に String[] argsを追加
*ArrayListのソート [#a836ada3]
-中に入れるものに System.IComparable を実装する
-実装例
public class CPMeshInfo : System.IComparable
{
public int No;
public int Hoge;
public int Fuga;
public Int32 CompareTo(Object o)
{
return this.No - (o as CPMeshInfo).No;
}
}
-ArrayListのSort()メソッドを呼ぶ
終了行:
→[[C#関連]]
#contents
*WPF [#w32e299b]
-[[Windows Presentation Foundation - WPF .NET Framework |...
-[[WPF の概要 | Microsoft Learn>https://learn.microsoft.c...
-[[チュートリアル - WPF .NET Framework | Microsoft Learn>...
-[[WPF入門>http://www.atmarkit.co.jp/fdotnet/chushin/intr...
*.NET Tips & Tutorial Web [#vf533357]
-[[【C#】逆コンパイルと難読化について【.NET】 - Qiita>htt...
-https://referencesource.microsoft.com/
-http://ja.gotdotnet.com/quickstart/howto/
-[[Some Cool Tips for .NET:http://www.codeproject.com/use...
-[[@ITの.NET TIPS:http://www.atmarkit.co.jp/fdotnet/dotne...
-[[.NETのつぼ:http://park16.wakwak.com/~mimi/dotnet/top.h...
-[[じゃんぬねっと:http://jeanne.wankuma.com/]]
-[[DOBON.NET:http://dobon.net/]]
-[[Mick Dohertys DotNet TIPS:http://dotnetrix.co.uk/]]
-[[30 minutes Regex Tutorial:http://www.codeproject.com/d...
-.NETでの正規表現については正規表現のページを参照
*テーマ別ページ [#tc5af770]
-.NETでの文字列処理
-FlexGrid.NET関連
-.NET フォーム関連
-.NET コントロール関連
-.NET ファイルシステム関連
-C#によるExcel制御
-ADO.NET関連
-ASP.NET関連
-.NETネットワークプログラミング
-.NETによるWindowsサービスの開発メモ
-[[PINVOKE.NET:http://www.pinvoke.net/]]
--[[PINVOKE.NET Add-In for Visual Studio:http://www.gotdo...
*一般 [#oc58fb17]
-[[WPFのGridを動的に作成する #C# - Qiita>https://qiita.co...
-[[Windows 8時代にWPFとSilverlightはどちらが生き残れるの...
--今後はSilverlightよりもWPFを選択するケースがこれまでよ...
--Silverlightは徐々にクロスプラットフォームをあきらめてい...
--マイクロソフトが「本当の意味でのクロスプラットフォーム...
--Silverlightの居場所は徐々に業務向けに偏ってくるのではな...
--現在、Windowsプラットフォーム上の業務アプリケーションで...
-[[いま使うべき、学ぶべき.NETテクノロジはどれ?>http://ww...
--遠藤 実際の現場において、やはりWPFは使われていないので...
--宮崎 実際の現場を見ていても、WPFはまだまだ少ないですね...
--さらにWPFが有利な点として、WPFのスキルを身に付けると、...
-[[他のメモリが壊れている…>http://www.atmarkit.co.jp/bbs/...
保護されているメモリに読み取りまたは書き込み操作を行おう...
他のメモリが壊れていることが考えられます。
--メモリアクセスバイオレーションが起きたときの例外メッセ...
--C#側でunsafeなことをしてないのに起きる場合はODBCやDAOな...
-[[イベントログにエントリを書き込む>http://dobon.net/vb/d...
-[[app.configには2つの用途がある>http://d.hatena.ne.jp/P...
-[[.NET開発者のためのDI&AOP入門>http://www.atmarkit.co.jp...
-コンピュータ名取得
System.Environment.MachineName
-[[5分でわかるActive Reports>http://codezine.jp/a/articl...
-[[Windowsメッセージで文字列を渡す>http://www.codeproject...
-[[Automating Undo/Redo with .NET Generics>http://www.cod...
-[[DEVPATH を使用してアセンブリを指定する:http://msdn2.mi...
--厳密名をつけたDLLの開発をする時などに知っておくと便利な話
開発時に、グローバル アセンブリ キャッシュにアセンブリを...
アセンブリのビルド出力ディレクトリを指す DEVPATH 環境変...
-ある色が明るい色か暗い色か判定したいとき:Color.GetBrigh...
-[[.NETアプリを軽快にするためのGC講座>http://www.atmarkit...
-[[Quick Introduction to PerlNET>http://www.codeproject.c...
-[[Using managed code to detect what .NET Framework versi...
-[[.NET Object Spy and InvokeRemote>http://www.codeprojec...
-[[Setting Enum's Through Reflection:http://www.codeproje...
-[[C#グローバライズ サンプル:http://www.codeproject.com/u...
-[[.NET Internationalization: The Developer's Guide to Bu...
-[[Mixing Managed and Unmanaged Code Using Managed C++:ht...
-[[リソースに画像を持たせて使う方法:http://www.microsoft....
-[[クリップボードの利用:http://www.microsoft.com/japan/ms...
-[[.NET Frameworkのバージョン確認方法:http://www.atmarkit...
-[[アセンブリ署名とコードアクセスセキュリティ:http://code...
--メリット1:参照DLLが変わっていないことを証明する
--メリット2:GACに登録することができるようになる
--メリット3:コードアクセスセキュリティで厳密名による設定...
-[[A Windows Explorer in a user control:http://www.codepr...
-[[キーボードフック:http://www.codeproject.com/useritems/...
-[[Processing Global Mouse and Keyboard Hooks in C#:http:...
-[[ハッシュテーブルを使うには?:http://www.atmarkit.co.jp...
--[[ハッシュをArrayListにコピーしてソートするやり方:http:...
-[[システムトレイにアラーム時計を作るサンプル:http://www....
-[[.NET system wide hotkey component:http://www.codeproje...
-[[DotLucene:http://www.dotlucene.net/]]
--オープンソースの全テキストサーチライブラリ.NET用
-[[リソースに埋め込んだデータを利用する:http://dobon.net/...
-[[アプリケーションアイコンの設定:http://www.atmarkit.co....
-[[.NET File Format:http://www.codeproject.com/dotnet/dot...
-[[日付の計算のサンプル:http://www.atmarkit.co.jp/fdotnet...
--DateTime, TimeSpanなどの扱い
-[[.NETパフォーマンスUPのためのコードレビュー@MSDN:http:/...
-[[サービス名の列挙:http://www.atmarkit.co.jp/fdotnet/dot...
*特定の処理にタイムアウトを実装するには [#s4cafcdc]
-http://bbs.wankuma.com/index.cgi?mode=al2&namber=9308&KL...
-スレッドを起こすか、非同期デリゲートを使う
*Application.DoEvents()の注意点 [#i01eaf96]
-ループの中で画面更新するためにDoEvents()を呼ぶ場合、メッ...
-かならずウィンドウズメッセージが何かポストされている状態...
*プロセスで使っているメモリの大きさなど [#xffb9926]
-このへんをヘルプで参照
--System.Diagnostics.Process.PagedMemorySize
--System.Diagnostics.Process.PeakPagedMemorySize
--System.Diagnostics.Process.PeakWorkingSet
--System.Diagnostics.Process.WorkingSet
*簡単な処理時間計測用クラス [#qe633af0]
class ProfTime
{
bool bInProf = false;
long m_start;
long m_end;
public void Start()
{
Debug.Assert(bInProf == false);
m_start = DateTime.Now.Ticks;
bInProf = true;
}
public void End()
{
Debug.Assert(bInProf);
m_end = DateTime.Now.Ticks;
bInProf = false;
}
public long GetErapsed()
{
Debug.Assert(bInProf == false);
//Debug.Assert(m_end != m_start);
return (m_end - m_start)/10000;
}
public double GetErapsedD()
{
Debug.Assert(bInProf == false);
//Debug.Assert(m_end != m_start);
double d = (m_end - m_start);
return d/10000;
}
public void End(string msg)
{
End();
Log.OutLog("PRF:" + msg + "所要時間:" + GetErapsed()...
}
}
-使い方の例
ProfTime p = new ProfTime();
p.Start();
//計測したい処理
p.End("ほげほげ処理");
etime = p.GetErapsed();
*アイドルイベントの使い方 [#i7f14720]
-FormではなくApplicationのイベントである点に注意
//適当なところにこれを入れる
Application.Idle += new EventHandler(IdleHandler);
//アイドルイベントハンドラ
void IdleHandler(Object obj, EventArgs args)
{
//一回だけでやめたい場合
Application.Idle -= new EventHandler(IdleHandler);
//適当に何かやる
}
*IEnumeratorの実装例 [#a4ea9cb8]
-これを実装すると何がうれしいかというと、foreach文の対象...
class SyokenInfoEnumelator : IEnumerator
{
ArrayList mAry;
int idx;
public SyokenInfoEnumelator(ArrayList a)
{
mAry = a;
Reset();
}
public object Current
{
get
{
Debug.Assert(mAry != null);
Debug.Assert(0 <= idx && idx < mAry.Count );
return mAry[idx];
}
}
public bool MoveNext()
{
if( mAry.Count <= 0)
return false;
else if( idx < mAry.Count )
return ++idx < mAry.Count; //ここがちょっとやや...
else
return false;
}
public void Reset()
{
idx = -1;
}
}
-[[参考:IEnumeratorとyieldキーワード>http://wisdom.sakur...
*リソースに埋めたテキストデータの取得 [#a3be5681]
/// <summary>
/// リソースからテキストを取ってくる
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
String getResourceTxt(String name)
{
try
{
System.Reflection.Assembly myAssembly = System.Reflect...
System.IO.StreamReader sr =
new System.IO.StreamReader(
myAssembly.GetManifestResourceStream(name),
System.Text.Encoding.GetEncoding("shift-jis"));
//内容を読み込む
String s = "";
s = sr.ReadToEnd();
/*
// 改行を取りたければこうする。
String ws;
do
{
ws = sr.ReadLine();
s += ws + " ";
}while( ws != null);
*/
//後始末
sr.Close();
return s;
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
Debug.Assert(false);
return "";
}
}
-このとき指定するnameは<モジュール名>.<サブフォルダ名>.<...
--nameを確認したければReflectorなどを使ってリソースのとこ...
-コンパイルするときにテキストファイルのプロパティの「ビル...
*Updaterサンプル [#z9b6b872]
-http://www.codeproject.com/tools/updater.asp
*二重起動チェック [#fa2d853f]
public static bool ChkDblProcess()
{
Process p = Process.GetCurrentProcess();
Process[] procs = Process.GetProcessesByName(p.Process...
foreach (Process wp in procs)
{
if (wp.Id != p.Id)
{
Log.Log_Write(LogType.ERROR, "同じプロセスが既に起...
return false;
}
}
return true; //OK
}
*二重起動チェックして起動してたら前出し [#wfd016b6]
-http://jeanne.wankuma.com/tips/process/activewindow.html
*二重起動チェックでパフォーマンスカウンタが使えないという...
二重起動チェックで以下のようにしている場合
If (UBound(Diagnostics.Process.GetProcessesByName _
(Diagnostics.Process.GetCurrentProcess.ProcessName))...
Exit Sub
End If
以下のようなメッセージを伴う例外が発生することがある。
プロセス パフォーマンス カウンタは無効にされているため、...
これは以下のレジストリキーが1になっていると起こるらしい。
HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\Services\Pe...
パフォーマンスカウンタが無効になり、上記の部分でInvalidOp...
-[[参考URL:http://www.atmarkit.co.jp/bbs/phpBB/viewtopic....
*.NETとCOM [#ha3e86ca]
-[[Understanding Classic COM Interoperability With .NET A...
-[[COM and .NET Interoperability>http://www.theserverside...
*他プロセス起動の例 [#cae62dfe]
using System.Diagnostics;
...
Process myProcess = new Process();
myProcess.StartInfo.FileName = "notepad.exe";
myProcess.StartInfo.Arguments = "";
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Nor...
myProcess.Start();
myProcess.WaitForExit();
*スレッド [#i5234c04]
-[[Visual C++でマルチスレッド・プログラミング>http://www....
-スレッドID取得
System.AppDomain.GetCurrentThreadId()
を使うのは古い仕様なので
Thread.CurrentThread.ManagedThreadId;
を参照
-[[スレッドの実行と同期@CodeZine>http://codezine.jp/a/art...
--[[非同期デリゲートとスレッドプール>http://codezine.jp/a...
-[[C#によるマルチスレッド>http://ufcpp.net/study/csharp/s...
-[[How to solve "Cross thread operation not valid">http:/...
-[[BackgroundWorkerコンポーネントの説明:http://www.atmark...
-[[.NETによるマルチスレッド解説@IT:http://www.atmarkit.co...
-[[.NET マルチスレッドプログラミングbyDOBON:http://codezi...
*コマンドライン引数を使いたい場合 [#a3166b0b]
-Main()の引数に String[] argsを追加
*ArrayListのソート [#a836ada3]
-中に入れるものに System.IComparable を実装する
-実装例
public class CPMeshInfo : System.IComparable
{
public int No;
public int Hoge;
public int Fuga;
public Int32 CompareTo(Object o)
{
return this.No - (o as CPMeshInfo).No;
}
}
-ArrayListのSort()メソッドを呼ぶ
ページ名: