zoukankan      html  css  js  c++  java
  • c# xml 输出注释格式控制

    string str=" ///*! 妆容类物品子分类 */ enum MakeupSubType { Item_InvalidMakeupSubType = -1, /*!< 无效类型 */ Item_MST_Begin = 300, Item_MST_Female_MouthColor = Item_MST_Begin, /*!< 女唇彩 */ Item_MST_Male_Mustache = 301, /*!< 男胡子 */ Item_MST_Male_Mouth = 302, /*!< 男嘴唇 */ Item_MST_Female_Blusher = 303, /*!< 女腮红 */ Item_MST_Eyebrow = 304, /*!< 眉毛 */ Item_MST_Eyelid = 305, /*!< 眼睑,眼皮 */ Item_MST_Pupil = 306, /*!< 美瞳,瞳孔 */ Item_MST_PupilLight = 307, /*!< 眼神光 */ Item_MST_EyeShadow = 308, /*!< 眼影膏 */ Item_MST_EyeLine = 309, /*!< 眼线*/ Item_MST_Female_EyeLash = 310, /*!< 女睫毛 */ Item_MST_End, //最大的类型值 };"

    以上string是格式已调好的文本由Notepad++直接拷贝到monodevelop中获得的,

    用XmlComment xmlcomn = xmldoc.CreateComment (comment)输出到xml,结果为(用notepad++打开):

    可见,保持了原有格式。

  • 相关阅读:
    C#中的委托和事件的使用
    C#中Attribute/特性的使用
    Eclipase + CDT
    设计模式总结
    Nginx源码编译
    Nginx自定义扩展模块
    电池的寿命
    大盗阿福
    河中跳房子
    An Easy Problem
  • 原文地址:https://www.cnblogs.com/wantnon/p/6932550.html
Copyright © 2011-2022 走看看