标题:[求助]C#代码转换成VB代码
只看楼主
华尔街牛
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-7-28
 问题点数:0 回复次数:0 
[求助]C#代码转换成VB代码

读web.config的代码。。。
急用,谢谢啊
代码如下:




using System;
using System.Collections.Generic;
using System.Text;

namespace TraveLine.SysHelpFrame
{
public class ApplacationHelper
{
private const string TRAVELINE_CONNECTIONSTRING = "TRAVELINE_CONNECTIONSTRING";

private const string TRAVELINE_CONNECTIONSTRING_DEFAULT = "Data Source=127.0.0.1;Initial Catalog=TraveLineDB;User ID=sa;password=";

private static string m_connectionString;

public static string TravelineConnectionStr
{
get
{
return m_connectionString;
}
set
{
m_connectionString = value;
}
}

protected static string ReadSetting(string key, string defaultValue)
{
try
{
string setting = System.Configuration.ConfigurationManager.AppSettings[key];
return (null == setting) ? defaultValue : setting;
}
catch
{
return defaultValue;
}
}

private static void ReadConveryanceConfiguration()
{
m_connectionString = ReadSetting(TRAVELINE_CONNECTIONSTRING, TRAVELINE_CONNECTIONSTRING_DEFAULT);
}

public static void OnAppStart(string appPath)
{
string m_appRoot = appPath;

// 读取配置节
ReadConveryanceConfiguration();
}
}
}

搜索更多相关主题的帖子: 代码 
2007-08-03 19:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-160186-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.207355 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved