Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs')
-rw-r--r--mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs b/mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs
index 00ab7bd0bcf..bf5fc697676 100644
--- a/mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs
+++ b/mcs/class/PresentationFramework/Mono.Windows.Serialization/CodeWriter.cs
@@ -325,7 +325,7 @@ namespace Mono.Windows.Serialization {
CodeExpression expr;
- if (destType == sourceType)
+ if (sourceType == destType || sourceType.IsSubclassOf(destType))
expr = varRef;
else
expr = new CodeCastExpression(