相关疑难解决方法(0)

在C#中使用XML Literals?

是否可以在C#代码文件中添加文字XML数据?我目前正在使用多行字符串文字,但你可以看到它变得混乱.有没有更好的方法呢?

string XML = @"<?xml version=""1.0"" encoding=""utf-8""?>
<customUI xmlns=""http://schemas.example.com/customui"">
    <toolbar id=""save"">
    </toolbar>
</customUI>";
Run Code Online (Sandbox Code Playgroud)

c# xml literals

32
推荐指数
4
解决办法
2万
查看次数

标签 统计

c# ×1

literals ×1

xml ×1