:"Using"ステートメントはC#からVBにどのように変換されますか?たとえば
BitmapImage bitmap = new BitmapImage();
byte[] buffer = GetHugeByteArray(); // from some external source
using (MemoryStream stream = new MemoryStream(buffer, false))
{
bitmap.BeginInit();
bitmap.CacheOption = BitmapCacheOption.OnLoad;
bitmap.StreamSource = stream;
bitmap.EndInit();
bitmap.Freeze();
}
はあなたが私にusing
についてのより多くを伝えることはできますか?
編集:JaredParの記事のコメントで説明したように
、この質問はVS2003でUsing
の実装と、より懸念しています。 Using
が.NET 2.0(VS2005)まで導入されていないことが指摘されました。 JaredParは同等の回避策を発表しました。
"キーワードC#を使用して"またはのバリエーションを検索してください。 –
** Visual Basicプログラミングガイド:** [方法:システムリソースの廃棄(Visual Basic)](http://msdn.microsoft.com/en-us/library/wydd5hkd.aspx) – DavidRR
usingディレクティブと同等のものを探します。 using System.Net;答えはここにありますhttp://stackoverflow.com/questions/4134472/vb-net-equivalent-to-cs-using-directive –