A propriedade System.Runtime.Serialization.SerializationInfo.GetValueNoThrow em C# é usada para obter o valor associado a uma chave específica no objeto SerializationInfo. A diferença é que ela não gera uma exceção se a chave não for encontrada, ao contrário do método GetValue que lança uma exceção KeyNotFoundException. Em vez disso, a GetValueNoThrow retorna um valor padrão para o tipo específico da chave, caso ela não seja encontrada. Isso pode ser útil quando se deseja evitar exceções e lidar com a falta de uma chave em uma operação de serialização.
System.Runtime.Serialization SerializationInfo.GetValueNoThrow em C# (CSharp) - 16 exemplos encontrados. Esses são os exemplos do mundo real mais bem avaliados de System.Runtime.Serialization.SerializationInfo.GetValueNoThrow em C# (CSharp) extraídos de projetos de código aberto. Você pode avaliar os exemplos para nos ajudar a melhorar a qualidade deles.