ProblemBook.NET
  • ProblemBook.NET
  • LANGS
  • Задачник.NET
    • Math
      • «AugmentedAssignment» (Задача)
      • «Rounding1» (Задача)
      • «Overflow» (Решение)
      • «Overflow» (Задача)
      • «DivideByZero» (Решение)
      • «DivideByZero» (Задача)
      • «Eps» (Решение)
      • «DynamicIncrement» (Решение)
      • «Eps» (Задача)
      • «DynamicIncrement» (Задача)
      • «Rounding2» (Решение)
      • «AugmentedAssignment» (Решение)
      • «Rounding1» (Решение)
      • «Rounding2» (Задача)
    • Oop
      • «InheritanceNestedClass» (Задача)
      • «OverloadResolutionBasic» (Решение)
      • «OverloadResolutionOverride» (Решение)
      • «OverloadResolutionBasic» (Задача)
      • «OverloadResolutionOverride» (Задача)
      • «OverloadResolutionInheritance» (Решение)
      • «OverloadResolutionInheritance» (Задача)
      • «StaticFieldInGenericType» (Решение)
      • «StaticFieldInGenericType» (Задача)
      • «InheritanceNestedClass» (Решение)
    • ValueTypes
      • «Enumerator» (Решение)
      • «MutableProperty» (Задача)
      • «Enumerator» (Задача)
      • «StructLayout» (Решение)
      • «StructLayout» (Задача)
      • «Boxing» (Решение)
      • «Boxing» (Задача)
      • «MutableProperty» (Решение)
    • Strings
      • «InternmentAndMetadata» (Решение)
      • «CorruptedNumber» (Решение)
      • «InternmentAndMetadata» (Задача)
      • «TextElementEnumerator» (Решение)
      • «CorruptedNumber» (Задача)
      • «CaseInComparison» (Решение)
      • «TextElementEnumerator» (Задача)
      • «CaseInComparison» (Задача)
      • «StableSorting» (Решение)
      • «Secure» (Решение)
      • «CurrentCulture» (Решение)
      • «StableSorting» (Задача)
      • «Secure» (Задача)
      • «StringPlusNull» (Решение)
      • «CurrentCulture» (Задача)
      • «ExplicitlyInternment» (Решение)
      • «PlusChar» (Решение)
      • «StringPlusNull» (Задача)
      • «ExplicitlyInternment» (Задача)
      • «PlusChar» (Задача)
      • «NoStringInterning» (Решение)
      • «CorruptedString» (Решение)
      • «PlusString» (Решение)
      • «CompareToVsEquals» (Решение)
      • «NoStringInterning» (Задача)
      • «PlusString» (Задача)
      • «CorruptedString» (Задача)
      • «CompareToVsEquals» (Задача)
    • Linq
      • «QueryAfterRemove» (Решение)
      • «ClosureAndVariable» (Решение)
      • «QueryAfterRemove» (Задача)
      • «ClosureAndVariable» (Задача)
      • «EnumerableToArray» (Решение)
      • «QueryWithInc» (Решение)
      • «EnumerableToArray» (Задача)
      • «QueryWithInc» (Задача)
      • «LifeAfterYield» (Решение)
      • “YieldExceptionYield” (Решение)
      • «LifeAfterYield» (Задача)
      • «ExceptionYieldYield» (Решение)
      • «ClosureAndForeach» (Решение)
      • «TryYieldFinally» (Задача)
      • «ClosureAndFor» (Решение)
      • «ExceptionYieldYield» (Задача)
      • «YieldExceptionYield» (Решение)
      • «ClosureAndForeach» (Задача)
      • «ClosureAndFor» (Задача)
      • «YieldExceptionYield» (Задача)
    • Multithreading
      • «ThreadStaticVariable» (Решение)
      • «ThreadStaticVariable» (Задача)
      • «LockSlimInFinalizer» (Решение)
      • «LockSlimInFinalizer» (Задача)
    • Summary
    • Введение
  • ProblemBook.NET
    • Oop
      • “OverloadResolutionInheritance” (Solution)
      • “InheritanceNestedClass” (Solution)
      • “OverloadResolutionInheritance” (Problem)
      • “InheritanceNestedClass” (Problem)
      • “OverloadResolutionOverride” (Solution)
      • “OverloadResolutionOverride” (Problem)
      • “StaticFieldInGenericType” (Solution)
      • “OverloadResolutionBasic” (Solution)
      • “StaticFieldInGenericType” (Problem)
      • “OverloadResolutionBasic” (Problem)
    • Strings
      • “CorruptedNumber” (Problem)
      • “PlusString” (Solution)
      • “TextElementEnumerator” (Problem)
      • “PlusString” (Problem)
      • “StableSorting” (Solution)
      • “StableSorting” (Problem)
      • “CaseInComparison” (Solution)
      • “CaseInComparison” (Problem)
      • “NoStringInterning” (Solution)
      • “Secure” (Solution)
      • “CorruptedString” (Solution)
      • “CompareToVsEquals” (Solution)
      • “CurrentCulture” (Solution)
      • “NoStringInterning” (Problem)
      • “Secure” (Problem)
      • “CorruptedString” (Problem)
      • “CompareToVsEquals” (Problem)
      • “StringPlusNull” (Solution)
      • “CurrentCulture” (Problem)
      • “ExplicitlyInternment” (Solution)
      • “PlusChar” (Solution)
      • “InternmentAndMetadata” (Solution)
      • “CorruptedNumber” (Solution)
      • “StringPlusNull” (Problem)
      • “ExplicitlyInternment” (Problem)
      • “PlusChar” (Problem)
      • “InternmentAndMetadata” (Problem)
      • “TextElementEnumerator” (Solution)
    • Linq
      • “YieldExceptionYield” (Problem)
      • “QueryAfterRemove” (Problem)
      • “ClosureAndVariable” (Problem)
      • “QueryWithInc” (Solution)
      • “QueryWithInc” (Problem)
      • “LifeAfterYield” (Solution)
      • “LifeAfterYield” (Problem)
      • “EnumerableToArray” (Solution)
      • “EnumerableToArray” (Problem)
      • «YieldExceptionYield» (Solution)
      • “ExceptionYieldYield” (Solution)
      • “ClosureAndForeach” (Solution)
      • “TryYieldFinally” (Problem)
      • “ClosureAndFor” (Solution)
      • “ExceptionYieldYield” (Problem)
      • “YieldExceptionYield” (Solution)
      • “ClosureAndForeach” (Problem)
      • “ClosureAndVariable” (Solution)
      • “QueryAfterRemove” (Solution)
      • “ClosureAndFor” (Problem)
    • Multithreading
      • “ThreadStaticVariable” (Solution)
      • “LockSlimInFinalizer” (Solution)
      • “ThreadStaticVariable” (Problem)
      • “LockSlimInFinalizer” (Problem)
    • ValueTypes
      • “StructLayout” (Problem)
      • “MutableProperty” (Solution)
      • “Boxing” (Solution)
      • “MutableProperty” (Problem)
      • “Boxing” (Problem)
      • “Enumerator” (Solution)
      • “Enumerator” (Problem)
      • “StructLayout” (Solution)
    • Math
      • “Rounding2” (Solution)
      • “AugmentedAssignment” (Solution)
      • “Rounding1” (Solution)
      • “Rounding2” (Problem)
      • “Rounding1” (Problem)
      • “AugmentedAssignment” (Problem)
      • “DivideByZero” (Solution)
      • “DivideByZero” (Problem)
      • “DynamicIncrement” (Solution)
      • “DynamicIncrement” (Problem)
      • “Eps” (Solution)
      • “Eps” (Problem)
      • “Overflow” (Solution)
      • “Overflow” (Problem)
    • Summary
    • Introduction
  • Attribution-NonCommercial-NoDerivatives 4.0 International
Powered by GitBook
On this page
  • Ответ
  • Объяснение
  • Ссылки

Was this helpful?

  1. Задачник.NET
  2. Strings

«StringPlusNull» (Решение)

Previous«Secure» (Задача)Next«CurrentCulture» (Задача)

Last updated 6 years ago

Was this helpful?

Ответ

False

Объяснение

Фрагмент из , раздел 7.8.4 Addition operator:

«String concatenation:

string operator +(string x, string y);
string operator +(string x, object y);
string operator +(object x, string y);

These overloads of the binary + operator perform string concatenation. If an operand of string concatenation is null, an empty string is substituted. Otherwise, any non-string argument is converted to its string representation by invoking the virtual ToString method inherited from type object. If ToString returns null, an empty string is substituted.»

Другими словами, при строковых операциях null превращается в пустую строку. Таким образом:

((string)null + null + null) == ("" + null + null) ==
  (("" + null) + null) == (("" + "") + null) == ("" + null) ==
  ("" + "") == ""
"" != null

Ссылки

C# Language Specification
Microsoft Reference Source
Mono 3.10.0 Source
Задача