一个语法方面的问题:提示错误使用了未赋值的局部变量“collection2”,怎么改呢,
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
TypeConverter.StandardValuesCollection collection2;
try
{
TypeConverter.StandardValuesCollection collection1 = new
onverter.StandardValuesCollection(this.values);
collection2 = collection1;
}
catch
{
}
return collection2;
}
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
TypeConverter.StandardValuesCollection collection2;
try
{
TypeConverter.StandardValuesCollection collection1 = new
onverter.StandardValuesCollection(this.values);
collection2 = collection1;
}
catch
{
}
return collection2;
}
解决方案 »
- 那位有在WEB中想QQ那样弹出提醒的代码
- 为什么要先装SQL2000/2005,再装VS 2005!! 我反着装的会有什么后果?
- 怎么深入提高asp.net??
- 请教高手在html使用ajax.net
- 小弟想做一个分页控件,请各位讨论思路!答者又分
- 这种错误怎么解决
- 非常奇怪的问题c#.net sybase dataset
- 用Dreamweaver mx 做ASP.NET VB网页时进行数据集(查询)时出现错误.
- 怎么在程序中取到由存储过程RAISERROR产生的错误信息
- 谁扣掉我的专家分,1000多呀,我需要好长时间才能上去的,太无耻了
- 急救!!!!!!!!!!!!!
- datagrid 小问题
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
TypeConverter.StandardValuesCollection collection2;
try
{
TypeConverter.StandardValuesCollection collection1 = new
onverter.StandardValuesCollection(this.values);
collection2 = collection1;
return collection2;
}
catch
{
}
}
“WayControls.WayQuickInput_Src.TableNameConvert.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)” : 并非所有的代码路径都返回值
try
{
TypeConverter.StandardValuesCollection collection1 = new
onverter.StandardValuesCollection(this.values);
collection2 = collection1;
return collection2;
}
catch
{
return null;
}