|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Método String.Contains
.NET Framework 4.5
Namespace: System
Assembly: mscorlib (em mscorlib.dll)
Parâmetros
- value
- Tipo: System.String
A cadeia de caracteres a busca.
Valor de retorno
Tipo: System.Boolean| Exceção | Condição |
|---|---|
| ArgumentNullException |
// This example demonstrates the String.Contains() method using System; class Sample { public static void Main() { string s1 = "The quick brown fox jumps over the lazy dog"; string s2 = "fox"; bool b; b = s1.Contains(s2); Console.WriteLine("Is the string, s2, in the string, s1?: {0}", b); } } /* This example produces the following results: Is the string, s2, in the string, s1?: True */
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Função Server Core sem suporte), Windows Server 2008 R2 (Função Server Core com suporte com o SP1 ou posterior, Itanium sem suporte)
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte .Requisitos de sistema do NET Framework.