mv** 报错:扩战法必须在非泛型静态类中定义

时间:2014.02.20 发布人:jizi385

mv** 报错:扩战法必须在非泛型静态类中定义

已解决问题

谷歌jizi385用户在2014.02.20提交了关于“猎魔人mv** 报错:扩战法必须在非泛型静态类中定义”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-02-24T08:19:02。publicclassDisplayDescriptionExtensions
{
publicstaticMvch**tmlStringDisplayDescription(thish**tmlh**elperhtmlh**elper,stringname)
{
ModelMetadata_modelMetadata=ModelMetadata.FromStringExpression(name,htmlh**elper.ViewData);
returnMvch**tmlString.Create(_modelMetadata.Description);
}
publicstaticMvch**tmlStringDisplayDescriptionFor<TModel,TResult>(thish**tmlh**elper<TModel>
htmlh**elper,Expression<Func<TModel,TResult>>expression)
{
ModelMetadata_modelMetadata=ModelMetadata.FromLambdaExpression(expression,htmlh**elper.ViewData);
returnMvch**tmlString.Create(_modelMetadata.Description);
}
}
如题,**等,急求大神希望大家能够帮助她。

详细问题描述及疑问:publicclassDisplayDescriptionExtensions
{
publicstaticMvch**tmlStringDisplayDescription(thish**tmlh**elperhtmlh**elper,stringname)
{
ModelMetadata_modelMetadata=ModelMetadata.FromStringExpression(name,htmlh**elper.ViewData);
returnMvch**tmlString.Create(_modelMetadata.Description);
}
publicstaticMvch**tmlStringDisplayDescriptionFor<TModel,TResult>(thish**tmlh**elper<TModel>
htmlh**elper,Expression<Func<TModel,TResult>>expression)
{
ModelMetadata_modelMetadata=ModelMetadata.FromLambdaExpression(expression,htmlh**elper.ViewData);
returnMvch**tmlString.Create(_modelMetadata.Description);
}
}
如题,**等,急求大神期待您的答案,不知道说什么,送你一朵小红花吧 !

希望以下的回答,能够帮助你。

第1个回答

用户名:YSh**ENG9099  

扩战法的类型是需要静态类的
publicstaticclassDisplayDescriptionExtensions