From 975fc2fc947713f22d961f5b96fbbb6717512437 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 27 Feb 2019 14:55:21 -0600 Subject: [PATCH] Remove suggestion to consider using Marshal.SizeOf. Marshal.SizeOf is not a direct replacement for `sizeof`. Fix #26513 --- src/Compilers/CSharp/Portable/CSharpResources.resx | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf | 4 ++-- src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf | 4 ++-- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Compilers/CSharp/Portable/CSharpResources.resx b/src/Compilers/CSharp/Portable/CSharpResources.resx index e1484e95b0cdf..63d95b2203ecd 100644 --- a/src/Compilers/CSharp/Portable/CSharpResources.resx +++ b/src/Compilers/CSharp/Portable/CSharpResources.resx @@ -994,7 +994,7 @@ A params parameter must be the last parameter in a formal parameter list - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context The type or namespace name '{0}' does not exist in the namespace '{1}' (are you missing an assembly reference?) @@ -5790,4 +5790,4 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ The feature '{0}' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version. - \ No newline at end of file + diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf index 2b7eab43d66c3..7811cf6d420dc 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0} nemá předdefinovanou velikost. Operátor sizeof jde proto použít jenom v kontextu unsafe (zvažte možnost použití operátoru System.Runtime.InteropServices.Marshal.SizeOf). + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0} nemá předdefinovanou velikost. Operátor sizeof jde proto použít jenom v kontextu unsafe (zvažte možnost použití operátoru System.Runtime.InteropServices.Marshal.SizeOf). diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf index 9b6575bb453fa..8f85f18231110 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '"{0}" enthält keine vordefinierte Größe, sizeof kann daher nur in einem ungeschützten Kontext verwendet werden (verwenden Sie ggf. System.Runtime.InteropServices.Marshal.SizeOf). + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '"{0}" enthält keine vordefinierte Größe, sizeof kann daher nur in einem ungeschützten Kontext verwendet werden (verwenden Sie ggf. System.Runtime.InteropServices.Marshal.SizeOf). diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf index 174d3c3929c3d..cd0b0fbda5785 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' no tiene un tamaño predefinido; por tanto, sizeof solo se puede usar en un contexto no seguro (use System.Runtime.InteropServices.Marshal.SizeOf). + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' no tiene un tamaño predefinido; por tanto, sizeof solo se puede usar en un contexto no seguro (use System.Runtime.InteropServices.Marshal.SizeOf). diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf index 2426274df823f..f342b9db9cdb5 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' n'a pas de taille prédéfinie ; c'est pourquoi sizeof ne peut être utilisé que dans un contexte unsafe (utilisez System.Runtime.InteropServices.Marshal.SizeOf) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' n'a pas de taille prédéfinie ; c'est pourquoi sizeof ne peut être utilisé que dans un contexte unsafe (utilisez System.Runtime.InteropServices.Marshal.SizeOf) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf index ea67125cf782a..1c9811125e42c 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' non ha una dimensione predefinita, quindi sizeof può essere usato solo in un contesto di tipo unsafe. Provare a usare System.Runtime.InteropServices.Marshal.SizeOf + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' non ha una dimensione predefinita, quindi sizeof può essere usato solo in un contesto di tipo unsafe. Provare a usare System.Runtime.InteropServices.Marshal.SizeOf diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf index e2f8c90d0a3fc..c8fae3f69c5a7 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' には定義済みのサイズが指定されていないため、sizeof は unsafe コンテキストでのみ使用できます (System.Runtime.InteropServices.Marshal.SizeOf の使用をお勧めします) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' には定義済みのサイズが指定されていないため、sizeof は unsafe コンテキストでのみ使用できます (System.Runtime.InteropServices.Marshal.SizeOf の使用をお勧めします) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf index 0f699ea0f63bb..b9a5b497b9f1a 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}'에 미리 정의된 크기가 없으므로 sizeof는 안전하지 않은 컨텍스트에서만 사용할 수 있습니다. System.Runtime.InteropServices.Marshal.SizeOf를 사용하세요. + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}'에 미리 정의된 크기가 없으므로 sizeof는 안전하지 않은 컨텍스트에서만 사용할 수 있습니다. System.Runtime.InteropServices.Marshal.SizeOf를 사용하세요. diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf index e984ca6780d80..87c5a8770aa87 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '„{0}” nie ma wstępnie zdefiniowanego rozmiaru, dlatego elementu sizeof można użyć tylko w kontekście słowa kluczowego „unsafe” (użyj elementu System.Runtime.InteropServices.Marshal.SizeOf) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '„{0}” nie ma wstępnie zdefiniowanego rozmiaru, dlatego elementu sizeof można użyć tylko w kontekście słowa kluczowego „unsafe” (użyj elementu System.Runtime.InteropServices.Marshal.SizeOf) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf index acf7a74f5105c..61e92df7b6024 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '"{0}" não tem um tamanho pré-definido; portanto, sizeof só pode ser usado em um contexto desprotegido (considere o uso de System.Runtime.InteropServices.Marshal.SizeOf) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '"{0}" não tem um tamanho pré-definido; portanto, sizeof só pode ser usado em um contexto desprotegido (considere o uso de System.Runtime.InteropServices.Marshal.SizeOf) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf index 0b20ee9fc2598..b46394403ec56 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '"{0}" не имеет предопределенного размера, поэтому оператор sizeof может использоваться только в небезопасном (unsafe) контексте (рекомендуется использование System.Runtime.InteropServices.Marshal.SizeOf). + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '"{0}" не имеет предопределенного размера, поэтому оператор sizeof может использоваться только в небезопасном (unsafe) контексте (рекомендуется использование System.Runtime.InteropServices.Marshal.SizeOf). diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf index 2b2b978ec7256..9e6fe33b88f31 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' öğesi önceden tanımlı boyuta sahip değil, bu nedenle sizeof yalnızca unsafe bağlamda kullanılabilir (System.Runtime.InteropServices.Marshal.SizeOf kullanmayı düşünün) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' öğesi önceden tanımlı boyuta sahip değil, bu nedenle sizeof yalnızca unsafe bağlamda kullanılabilir (System.Runtime.InteropServices.Marshal.SizeOf kullanmayı düşünün) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf index 5d926edee30e0..7b3c0fa408676 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf @@ -2358,8 +2358,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '“{0}”没有预定义的大小,因此 sizeof 只能在不安全的上下文中使用(请考虑使用 System.Runtime.InteropServices.Marshal.SizeOf) + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '“{0}”没有预定义的大小,因此 sizeof 只能在不安全的上下文中使用(请考虑使用 System.Runtime.InteropServices.Marshal.SizeOf) diff --git a/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf b/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf index ef3f5fe844633..ba53695101a1a 100644 --- a/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf +++ b/src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf @@ -2653,8 +2653,8 @@ - '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf) - '{0}' 沒有預先定義的大小,因此 sizeof 只能使用於 unsafe 內容 (請考慮使用 System.Runtime.InteropServices.Marshal.SizeOf)。 + '{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context + '{0}' 沒有預先定義的大小,因此 sizeof 只能使用於 unsafe 內容 (請考慮使用 System.Runtime.InteropServices.Marshal.SizeOf)。