如何访问资源文件字符串并显示在我的.chtml页面中?

时间:2016-11-09 11:12:31

标签: c# string model-view-controller resources

我有一个名为 Resources.resx 的资源文件,我希望使用一些文本访问名为 appDisclaimer 的文件中的字符串。

如何访问此字符串并显示在我的.cshtml视图页面中? 例如:

public override void PrepareForSegue (NSStoryboardSegue segue, NSObject sender)
        {
if (segue.Identifier.Equals ("ImageInfo")) {
                var vc = segue.DestinationController as InfoViewController;
                vc.SetData (item);

            } 
}

1 个答案:

答案 0 :(得分:0)

基于我的评论中链接的问题:

<footer>@NSResources.Resource.appDisclaimer </footer>

NSResources 是命名空间 资源是文件名 appDisclaimer 我的字符串

相关问题