StringInfo.SubstringByTextElements 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从当前 StringInfo 对象中检索文本元素的子字符串。
重载
| SubstringByTextElements(Int32) | 从当前的 StringInfo 对象检索文本元素的子字符串(从指定的文本元素开始,一直到最后一个文本元素)。 | 
| SubstringByTextElements(Int32, Int32) | 从当前的 StringInfo 对象中检索文本元素的子字符串(从指定文本元素开始,一直到指定数目的文本元素)。 | 
SubstringByTextElements(Int32)
- Source:
- StringInfo.cs
- Source:
- StringInfo.cs
- Source:
- StringInfo.cs
从当前的 StringInfo 对象检索文本元素的子字符串(从指定的文本元素开始,一直到最后一个文本元素)。
public:
 System::String ^ SubstringByTextElements(int startingTextElement);public string SubstringByTextElements (int startingTextElement);member this.SubstringByTextElements : int -> stringPublic Function SubstringByTextElements (startingTextElement As Integer) As String参数
- startingTextElement
- Int32
此 StringInfo 对象中文本元素的从零开始的索引。
返回
此 StringInfo 对象中的文本元素的子字符串(从 startingTextElement 参数指定的文本元素索引开始,一直到此对象中的最后一个文本元素)。
例外
注解
考虑一个由五个文本元素组成的字符串,这些元素的索引从 0 到 4。 
              startingTextElement如果 参数为 1,则 SubstringByTextElements 方法返回一个子字符串,该子字符串由索引为 1、2、3 和 4 的文本元素组成。
适用于
SubstringByTextElements(Int32, Int32)
- Source:
- StringInfo.cs
- Source:
- StringInfo.cs
- Source:
- StringInfo.cs
从当前的 StringInfo 对象中检索文本元素的子字符串(从指定文本元素开始,一直到指定数目的文本元素)。
public:
 System::String ^ SubstringByTextElements(int startingTextElement, int lengthInTextElements);public string SubstringByTextElements (int startingTextElement, int lengthInTextElements);member this.SubstringByTextElements : int * int -> stringPublic Function SubstringByTextElements (startingTextElement As Integer, lengthInTextElements As Integer) As String参数
- startingTextElement
- Int32
此 StringInfo 对象中文本元素的从零开始的索引。
- lengthInTextElements
- Int32
要检索的文本元素的数目。
返回
此 StringInfo 对象中的文本元素的子字符串。 子字符串包含由 lengthInTextElements 参数指定的文本元素数量,并从 startingTextElement 参数指定的文本元素索引开始。
例外
              startingTextElement 小于零。
- 或 -
              startingTextElement 大于或等于当前 StringInfo 对象的值字符串的长度。
- 或 -
              lengthInTextElements 小于零。
- 或 -
当前 StringInfo 对象的值字符串是空字符串 ("")。
- 或 -
              startingTextElement
               + 
              lengthInTextElements 指定大于此 StringInfo 对象中的文本元素数目的索引。
注解
考虑一个由五个文本元素组成的字符串,这些元素的索引从 0 到 4。 
              startingTextElement如果参数为 1 且lengthInTextElements参数为 3,则SubstringByTextElements方法返回一个子字符串,其中包含其索引为 1、2 和 3 的文本元素。