• 数组和List以指定的方式拼接成字符串类型


      /// <summary>
            /// list转换成格式的字符串
            /// </summary>
            /// <param name="param">拼接格式字符串</param>
            /// <param name="list"></param>
            /// <returns></returns>
            public string GetStrFromList(string param, List<string> list)
            {
    
                return list.Count > 0 ? String.Join(param, list)
                    : string.Empty;
            }
            /// <summary>
            /// 数组转换成指定格式的字符串
            /// </summary>
            /// <param name="param">拼接格式字符串</param>
            /// <param name="list"></param>
            /// <returns></returns>
            public string GetStrFromList(string param, string[] strArr)
            {
                return strArr.Length > 0 ? String.Join(param, strArr)
                    : string.Empty;
            }
  • 相关阅读:
    C++中const变量使用注意
    const对象调用static成员函数
    Error in startup script: value for " " missing
    check tcl version
    socket
    grid pack
    mouse bind
    gesture
    pixel
    open
  • 原文地址:https://www.cnblogs.com/Angel-szl/p/9761656.html
Copyright © 2020-2023  润新知