シチュエーション別同一目的 -- Part1


  VB Framework 版



  
vbc.exe lang_05.bas
  
↑ビルド

↓Framework 書式
http://msdn.microsoft.com/ja-jp/library/txafckwd.aspx

  
Imports System.Environment
Imports System.IO

Module MyModule

' ********************************************************
' * 実行
' ********************************************************
Sub Main()

	' PATH 環境変数取得
	Dim strEnv as String = GetEnvironmentVariable( "PATH" )

	' 区切り文字定義
	Dim delimStr As String = ";"
	Dim delimiter As Char() = delimStr.ToCharArray()

	' 配列定義
	Dim split As String() = Nothing

	' トークン分割
	split = strEnv.Split( delimiter ) 

	' ソート
	Array.Sort( split, split.GetLowerBound(0), split.Length )

	Dim strValue as String

	' 書き込み
	Try
		Dim OutFile As StreamWriter = New StreamWriter("result.txt", false )
		For each strValue In split
			Call OutFile.WriteLine( strValue )
		Next
		OutFile.Flush()
		OutFile.Close()

	Catch e As Exception
		Console.WriteLine("エラーの内容 : {0}", e.ToString())
	End Try

End Sub

End Module
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ