
October 6, 2008 21:32 by
次の Visual Studio と .NET Framework のバージョンは、Visual Studio 2010 と .NET Framework 4.0 になるとのこと。
気になるのは、.NET Framework 4.0 の CLR のバージョンがどうなるかですね。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 17, 2008 19:19 by
今まで同じものだと思ってた。 ( WindowsIdentity と IPrincipal の違いは置いといて。)
それぞれ違うユーザー情報を返してきた時は驚いた。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 16, 2008 13:21 by
citiszo
通常、インスタンスを生成する際には必ずコンストラクタが呼び出されます。
でも実は、コンストラクタを実行せずにインスタンスを生成することができます。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 14, 2008 19:23 by
とりこびとさんの記事を読んでいて、そういえば VB のイベント定義って C# と違うんだよなぁと思い出したことがきっかけで、久々に VB のコードを書いてみました。そしたら、ちょっとした問題に気づきました。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 11, 2008 13:42 by
JavaScriptはオブジェクト指向言語である。
ただし、”クラスベース”のオブジェクト指向言語 ( C#やJavaなど ) ではなく、”プロトタイプベース”のオブジェクト指向言語である。
以下、JavaScriptでのOOPについての簡単な解説。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 11, 2008 13:39 by
何かと言うと、usingブロック内で得た値を戻り値で返す場合です。
例えば、
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 11, 2008 10:11 by
最近、というか今日から、HTML や ASPX と対になる JS ファイルの書き方を変えてみた。
こんな感じ。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 12:47 by
citiszo
では、System.Timers.Timerを使った非同期処理の場合はどうなるんだろうか?
この Timerもスレッドが生成されるので、同じ動きだろうか?
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 12:24 by
http://msdn2.microsoft.com/en-us/library/fs2xkftw.aspx
のコードをみて、以下のように書いたら、base.Dispose() が呼ばれない可能性があるということで、FxCopの警告が出た。
protected override void Dispose(bool disposing) {
if(!this.disposed) {
try {
if(disposing) {
addedManaged.Dispose();
}
this.disposed = true;
} finally {...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 12:20 by
IEnumerator
は、IDisposableを実装してる [More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 12:19 by
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 11:43 by
int? a = 10;
Type type = a.GetType();
Console.WriteLine(type.Name);
を実行すると、
Int32
って表示されるんだ。
Nullable`1
って表示されるのかと思った。
当然なのだが、
a = null;
type = a.GetType();
だと、
「オブジェクト参照がオブジェクト インスタンスに設定されていません。」
と、例外が発生する。
そういう意味では、Int32と表示されるのは。理にかなっているのかな?
ローカル変数 int? x が宣言...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 10, 2008 10:21 by
このブログのアクセス解析でどのキーワードで検索されたかを見てみると意外とArrayListやHashtableで検索されていたりする。
Visual Studio 2005以降を使っているのならば、是非。List
, Dictionaryを使ってほしいものだ。 [More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
C#で、
public class MyClass {
public IEnumerable<int> GetEnumerator() {
yield return 1;
yield return 2;
yield return 3;
yield return 4;
}
}
というコードを書けば、
MyClass mc = new MyClass();
foreach ( int i in mc.GetEnumerator() ) {
Console.WriteLine(i);
}
と foreach 文が書ける。最も...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 8, 2008 12:30 by
型付DataSetのテーブルのカラムの型を、int ではなく、独自の列挙型にするには、2つの方法がある。
ひとつは、型付DataSetの定義を行う場合に列のデータ型を列挙型に指定する方法。
これは、デザイナー画面で、DataTypeプロパティの値を System.Int32 などから、独自の型 Gushwell.Genderなどを指定してあげればよい。
ドロップダウンリストには現れないので、手入力になる。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5