建站极客
软件编程 C#教程 正文
c# StringBuilder.Replace 方法 (Char, Char, Int32, Int32)
所属分类:
软件编程 / C#教程
阅读数:
163
收藏 0
赞 0
分享
将此实例的子字符串中所有指定字符的匹配项替换为其他指定字符。 命名空间:System.Text 程序集:mscorlib(在 mscorlib.dll 中) 语法 C# public StringBuilder Replace ( char oldChar, char newChar, int startIndex, int count ) 参数 oldChar 要替换的字符。 newChar 替换 oldChar 的字符。 startIndex 此实例中子字符串开始的位置。 count 子字符串的长度。 返回值 对此实例的引用,其中从 startIndex 到 startIndex + count -1 范围内的 oldChar 被 newChar 替换。 异常 异常类型 条件 ArgumentOutOfRangeException startIndex+count 大于此实例值的长度。 - 或 - startIndex 或 count 小于零。 备注 StringBuilder 的大小不变,这是因为只是替换字符。此方法区分大小写。 平台 Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、 Windows Mobile for Pocket PC、Windows Mobile for Smartphone、 Windows Server 2003、Windows XP Media Center Edition、 Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition .NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。 版本信息 .NET Framework 受以下版本支持:2.0、1.1、1.0
c#唯一值渲染实例代码 这篇文章主要介绍了c#唯一值渲染实例代码,有需要的朋友可以参考一下
评论 0
收藏 0
赞 0
分享
c#文本加密程序代码示例 这是一个加密软件,但只限于文本加密,加了窗口控件的滑动效果,详细看下面的代码
评论 0
收藏 0
赞 0
分享
C# WinForm导出Excel方法介绍 在.NET应用中,导出Excel是很常见的需求,导出Excel报表大致有以下三种方式:Office PIA,文件流和NPOI开源库,本文只介绍前两种方式
评论 0
收藏 0
赞 0
分享
C#串口通信程序实例详解 在.NET平台下创建C#串口通信程序,.NET 2.0提供了串口通信的功能,其命名空间是System.IO.Ports,创建C#串口通信程序的具体实现是如何的呢?让我们开始吧
评论 0
收藏 0
赞 0
分享
查看更多