当前位置: 首页>>代码示例>>C#>>正文


C# SqlChars.ToSqlString方法代码示例

本文整理汇总了C#中System.Data.SqlTypes.SqlChars.ToSqlString方法的典型用法代码示例。如果您正苦于以下问题:C# SqlChars.ToSqlString方法的具体用法?C# SqlChars.ToSqlString怎么用?C# SqlChars.ToSqlString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Data.SqlTypes.SqlChars的用法示例。


在下文中一共展示了SqlChars.ToSqlString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SplitString

    public static IEnumerable SplitString(SqlChars input, SqlChars splitter)
    {
        string[] array;
        if (input.IsNull)
        {
            array = new string[] { null };
        }
        else if (splitter.IsNull)
        {
            array = new string[] { input.ToSqlString().Value };
        }
        else
        {
            string inputStr = input.ToSqlString().Value;
            string sepStr = splitter.ToSqlString().Value;
            string[] separatorsArray = sepStr.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

            array = inputStr.Split(separatorsArray, StringSplitOptions.RemoveEmptyEntries);
        }
        return array;
    }
开发者ID:JodenSoft,项目名称:JodenSoft,代码行数:21,代码来源:SplitString.cs

示例2: ToSqlString

 /// <summary>
 /// Converts the value of the specified SqlChars to its equivalent SqlString representation.
 /// </summary>
 /// <param name="value">An SqlChars.</param>
 /// <returns>The SqlString equivalent of the SqlChars.</returns>        
 public static SqlString ToSqlString(SqlChars value) { return value.ToSqlString(); }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:6,代码来源:Convert.cs

示例3: ToString

 /// <summary>
 /// Converts the value of the specified SqlChars to its equivalent String representation.
 /// </summary>
 /// <param name="value">An SqlChars.</param>
 /// <returns>The String equivalent of the SqlChars.</returns>        
 public static String ToString(SqlChars value) { return value.IsNull ? null : value.ToSqlString().Value; }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:6,代码来源:Convert.cs

示例4: ToXmlDocument

 /// <summary>
 /// Converts the value of the specified SqlChars to its equivalent XmlDocument representation.
 /// </summary>
 /// <param name="value">An SqlChars.</param>
 /// <returns>The equivalent XmlDocument.</returns>
 public static XmlDocument ToXmlDocument(SqlChars value) { return value.IsNull ? null : ToXmlDocument(value.ToSqlString().Value); }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:6,代码来源:Convert.cs

示例5: ToXmlReader

 /// <summary>
 /// Converts the value of the specified SqlChars to its equivalent XmlReader representation.
 /// </summary>
 /// <param name="value">An SqlChars.</param>
 /// <returns>The equivalent XmlReader.</returns>
 public static XmlReader ToXmlReader(SqlChars value) { return value.IsNull ? null : new XmlTextReader(new StringReader(value.ToSqlString().Value)); }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:6,代码来源:Convert.cs

示例6: ToSqlXml

 /// <summary>
 /// Converts the value of the specified SqlChars to its equivalent SqlXml representation.
 /// </summary>
 /// <param name="value">An SqlChars.</param>
 /// <returns>The equivalent SqlXml.</returns>
 public static SqlXml ToSqlXml(SqlChars value) { return value.IsNull ? SqlXml.Null : new SqlXml(new XmlTextReader(new StringReader(value.ToSqlString().Value))); }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:6,代码来源:Convert.cs

示例7: ToSqlString

		/// <summary>Converts the value from <c>SqlChars</c> to an equivalent <c>SqlString</c> value.</summary>
		public static SqlString ToSqlString(SqlChars        p) { return p.ToSqlString();                                                                  }
开发者ID:titolarz,项目名称:bltoolkit,代码行数:2,代码来源:Convert.generated.cs

示例8: ToString

		/// <summary>Converts the value from <c>SqlChars</c> to an equivalent <c>String</c> value.</summary>
		public static String ToString(SqlChars        p) { return p.IsNull ? Configuration.NullableValues.String : p.ToSqlString().Value;                                }
开发者ID:titolarz,项目名称:bltoolkit,代码行数:2,代码来源:Convert.generated.cs

示例9: ToXElement

		/// <summary>Converts the value from <c>SqlChars</c> to an equivalent <c>XElement</c> value.</summary>
		public static XElement ToXElement(SqlChars p) { return p.IsNull ? null : ToXElement(p.ToSqlString().Value); }
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:2,代码来源:Convert.cs

示例10: ToString

		/// <summary>Converts the value from <c>SqlChars</c> to an equivalent <c>String</c> value.</summary>
		public static String ToString(SqlChars p)        { return p.IsNull?  null : p.ToSqlString().Value; }
开发者ID:epdumitru,项目名称:mysqlib,代码行数:2,代码来源:Convert.cs

示例11: Split

 public static IEnumerator Split(SqlChars instr, [SqlFacet(IsFixedLength = true, MaxSize = 1)]SqlString delimiter)
 {
     return ((instr.IsNull || delimiter.IsNull) ? new SplitString("", ',') : new SplitString(instr.ToSqlString().Value, Convert.ToChar(delimiter.Value)));
 }
开发者ID:yorek,项目名称:devweek2016,代码行数:4,代码来源:SplitString.cs


注:本文中的System.Data.SqlTypes.SqlChars.ToSqlString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。