diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index f215e30..bdca707 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -66,6 +66,9 @@
       iter = parsed_options.find("nullable");
       nullable_ = (iter != parsed_options.end());
 
+      iter = parsed_options.find("union");
+      union_ = (iter != parsed_options.end());
+
       iter = parsed_options.find("serial");
       serialize_ = (iter != parsed_options.end());
       if (serialize_) {
@@ -88,6 +91,7 @@
     void generate_typedef (t_typedef* ttypedef);
     void generate_enum (t_enum* tenum);
     void generate_struct (t_struct* tstruct);
+    void generate_union (t_struct* tunion);
     void generate_xception (t_struct* txception);
     void generate_service (t_service* tservice);
     void generate_property(ofstream& out, t_field* tfield, bool isPublic, bool generateIsset);
@@ -98,12 +102,16 @@
     void print_const_def_value(std::ofstream& out, std::string name, t_type* type, t_const_value* value);
 
     void generate_csharp_struct(t_struct* tstruct, bool is_exception);
+    void generate_csharp_union(t_struct* tunion);
     void generate_csharp_struct_definition(std::ofstream& out, t_struct* tstruct, bool is_xception=false, bool in_class=false, bool is_result=false);
+    void generate_csharp_union_definition(std::ofstream& out, t_struct* tunion);
+    void generate_csharp_union_class(std::ofstream& out, t_struct* tunion, t_field* tfield);
     void generate_csharp_wcffault(std::ofstream& out, t_struct* tstruct);
     void generate_csharp_struct_reader(std::ofstream& out, t_struct* tstruct);
     void generate_csharp_struct_result_writer(std::ofstream& out, t_struct* tstruct);
     void generate_csharp_struct_writer(std::ofstream& out, t_struct* tstruct);
     void generate_csharp_struct_tostring(std::ofstream& out, t_struct* tstruct);
+    void generate_csharp_union_reader(std::ofstream& out, t_struct* tunion);
 
     void generate_function_helpers(t_function* tfunction);
     void generate_service_interface (t_service* tservice);
@@ -112,13 +120,13 @@
     void generate_service_server (t_service* tservice);
     void generate_process_function (t_service* tservice, t_function* function);
 
-    void generate_deserialize_field (std::ofstream& out, t_field* tfield, std::string prefix="");
+    void generate_deserialize_field (std::ofstream& out, t_field* tfield, std::string prefix="", bool is_propertyless=false);
     void generate_deserialize_struct (std::ofstream& out, t_struct* tstruct, std::string prefix="");
     void generate_deserialize_container (std::ofstream& out, t_type* ttype, std::string prefix="");
     void generate_deserialize_set_element (std::ofstream& out, t_set* tset, std::string prefix="");
     void generate_deserialize_map_element (std::ofstream& out, t_map* tmap, std::string prefix="");
     void generate_deserialize_list_element (std::ofstream& out, t_list* list, std::string prefix="");
-    void generate_serialize_field (std::ofstream& out, t_field* tfield, std::string prefix="", bool is_element=false);
+    void generate_serialize_field (std::ofstream& out, t_field* tfield, std::string prefix="", bool is_element=false, bool is_propertyless=false);
     void generate_serialize_struct (std::ofstream& out, t_struct* tstruct, std::string prefix="");
     void generate_serialize_container (std::ofstream& out, t_type* ttype, std::string prefix="");
     void generate_serialize_map_element (std::ofstream& out, t_map* tmap, std::string iter, std::string map);
@@ -174,6 +182,7 @@
     bool async_;
     bool async_ctp_;
     bool nullable_;
+    bool union_;
     bool serialize_;
     bool wcf_;
     std::string wcf_namespace_;
@@ -447,7 +456,11 @@
 }
 
 void t_csharp_generator::generate_struct(t_struct* tstruct) {
-  generate_csharp_struct(tstruct, false);
+  if (union_ && tstruct->is_union()) {
+    generate_csharp_union(tstruct);
+  } else {
+    generate_csharp_struct(tstruct, false);
+  }
 }
 
 void t_csharp_generator::generate_xception(t_struct* txception) {
@@ -925,6 +938,102 @@
   indent(out) << "}" << endl << endl;
 }
 
+
+void t_csharp_generator::generate_csharp_union(t_struct* tunion) {
+  string f_union_name = namespace_dir_ + "/" + (tunion->get_name()) + ".cs";
+  ofstream f_union;
+
+  f_union.open(f_union_name.c_str());
+
+  f_union <<
+    autogen_comment() <<
+    csharp_type_usings() <<
+    csharp_thrift_usings() << endl;
+
+  generate_csharp_union_definition(f_union, tunion);
+
+  f_union.close();
+}
+
+void t_csharp_generator::generate_csharp_union_definition(std::ofstream& out, t_struct* tunion) {
+  // Let's define the class first
+  start_csharp_namespace(out);
+
+  indent(out) << "public abstract class " << tunion->get_name() << " : TAbstractBase {" << endl;
+
+  indent_up();
+
+  indent(out) << "public abstract void Write(TProtocol protocol);" << endl;
+  indent(out) << "public readonly bool Isset;" << endl;
+  indent(out) << "public abstract object Data { get; }" << endl;
+
+  indent(out) << "protected " << tunion->get_name() << "(bool isset) {" << endl;
+  indent_up();
+  indent(out) << "Isset = isset;" << endl;
+  indent_down();
+  indent(out) << "}" << endl << endl;
+
+  indent(out) << "public class ___undefined : " << tunion->get_name() << " {" << endl;
+  indent_up();
+
+  indent(out) << "public override object Data { get { return null; } }" << endl;
+
+  indent(out) << "public ___undefined() : base(false) {}" << endl << endl;
+
+  indent(out) << "public override void Write(TProtocol protocol) {" << endl;
+  indent_up();
+  indent(out) << "throw new Exception(\"Cannot persist an union type which is not set.\");" << endl;
+  indent_down();
+  indent(out) << "}" << endl << endl;
+
+  indent_down();
+  indent(out) << "}" << endl << endl;
+
+  const vector<t_field*>& fields = tunion->get_members();
+  vector<t_field*>::const_iterator f_iter;
+
+  for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
+    generate_csharp_union_class(out, tunion, (*f_iter));
+  }
+
+  generate_csharp_union_reader(out, tunion);
+
+  indent_down();
+  indent(out) << "}" << endl << endl;
+
+  end_csharp_namespace(out);
+}
+
+void t_csharp_generator::generate_csharp_union_class(std::ofstream& out, t_struct* tunion, t_field* tfield) {
+  indent(out) << "public class " << tfield->get_name() << " : " << tunion->get_name() << " {" << endl;
+  indent_up();
+  indent(out) << "private " << type_name(tfield->get_type()) << " _data;" << endl;
+  indent(out) << "public override object Data { get { return _data; } }" << endl;
+  indent(out) << "public " << tfield->get_name() << "(" << type_name(tfield->get_type()) << " data) : base(true) {" << endl;
+  indent_up();
+  indent(out) << "this._data = data;" << endl;
+  indent_down();
+  indent(out) << "}" << endl;
+  indent(out) << "public override void Write(TProtocol oprot) {" << endl;
+  indent_up();
+  indent(out) << "TField field = new TField();" << endl;
+  indent(out) << "field.Name = \"" << tfield->get_name() << "\";" << endl;
+  indent(out) << "field.Type = " << type_to_enum(tfield->get_type()) << ";" << endl;
+  indent(out) << "field.ID = " << tfield->get_key() << ";" << endl;
+  indent(out) << "oprot.WriteFieldBegin(field);" << endl;
+  
+  generate_serialize_field(out, tfield, "_data", true, true);
+
+  indent(out) << "oprot.WriteFieldEnd();" << endl;
+  indent(out) << "oprot.WriteFieldStop();" << endl;
+  indent(out) << "oprot.WriteStructEnd();" << endl;
+  indent_down();
+  indent(out) << "}" << endl;
+
+  indent_down();
+  indent(out) << "}" << endl << endl;
+}
+
 void t_csharp_generator::generate_service(t_service* tservice) {
   string f_service_name = namespace_dir_ + "/" + service_name_ + ".cs";
   f_service_.open(f_service_name.c_str());
@@ -1576,7 +1685,79 @@
   f_service_ << endl;
 }
 
-void t_csharp_generator::generate_deserialize_field(ofstream& out, t_field* tfield, string prefix) {
+void t_csharp_generator::generate_csharp_union_reader(std::ofstream& out, t_struct* tunion) {
+  // Thanks to THRIFT-1768, we don't need to check for required fields in the union
+  const vector<t_field*>& fields = tunion->get_members();
+  vector<t_field*>::const_iterator f_iter;
+
+  indent(out) << "public static " << tunion->get_name() << " Read(TProtocol iprot)" << endl;
+  scope_up(out);
+  indent(out) << tunion->get_name() << " retval;" << endl;
+  indent(out) << "iprot.ReadStructBegin();" << endl;
+  indent(out) << "TField field = iprot.ReadFieldBegin();" << endl;
+  // we cannot have the first field be a stop -- we must have a single field defined
+  indent(out) << "if (field.Type == TType.Stop)" << endl;
+  scope_up(out);
+  indent(out) << "iprot.ReadFieldEnd();" << endl;
+  indent(out) << "retval = new ___undefined();" << endl;
+  scope_down(out);
+  indent(out) << "else" << endl;
+  scope_up(out);
+  indent(out) << "switch (field.ID)" << endl;
+  scope_up(out);
+
+  for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
+    indent(out) <<
+      "case " << (*f_iter)->get_key() << ":" << endl;
+    indent_up();
+    indent(out) << "if (field.Type == " << type_to_enum((*f_iter)->get_type()) << ") {" << endl;
+    indent_up();
+
+    indent(out) << type_name((*f_iter)->get_type()) << " temp;" << endl;
+    generate_deserialize_field(out, (*f_iter), "temp", true);
+    indent(out) << "retval = new " << (*f_iter)->get_name() << "(temp);" << endl;
+    
+    indent_down();
+    out <<
+      indent() << "} else { " << endl <<
+      indent() << "  TProtocolUtil.Skip(iprot, field.Type);" << endl <<
+      indent() << "  retval = new ___undefined();" << endl <<
+      indent() << "}" << endl <<
+      indent() << "break;" << endl;
+    indent_down();
+  }
+
+  indent(out) <<
+    "default: " << endl;
+  indent_up();
+  indent(out) << "TProtocolUtil.Skip(iprot, field.Type);" << endl <<
+    indent() << "retval = new ___undefined();" << endl;
+  indent(out) << "break;" << endl;
+  indent_down();
+
+  scope_down(out);
+
+  indent(out) << "iprot.ReadFieldEnd();" << endl;
+
+  indent(out) << "if (iprot.ReadFieldBegin().Type != TType.Stop)" << endl;
+  scope_up(out);
+  indent(out) << "throw new TProtocolException(TProtocolException.INVALID_DATA);" << endl;
+  scope_down(out);
+
+  // end of else for TStop
+  scope_down(out);
+
+  indent(out) <<
+    "iprot.ReadStructEnd();" << endl;
+
+  indent(out) << "return retval;" << endl;
+
+  indent_down();
+
+  indent(out) << "}" << endl << endl;
+}
+
+void t_csharp_generator::generate_deserialize_field(ofstream& out, t_field* tfield, string prefix, bool is_propertyless) {
   t_type* type = tfield->get_type();
   while(type->is_typedef()) {
     type = ((t_typedef*)type)->get_type();
@@ -1586,7 +1767,7 @@
     throw "CANNOT GENERATE DESERIALIZE CODE FOR void TYPE: " + prefix + tfield->get_name();
   }
 
-  string name = prefix + prop_name(tfield);
+  string name = prefix + (is_propertyless ? "" : prop_name(tfield));
 
   if (type->is_struct() || type->is_xception()) {
     generate_deserialize_struct(out, (t_struct*)type, name);
@@ -1647,9 +1828,13 @@
 }
 
 void t_csharp_generator::generate_deserialize_struct(ofstream& out, t_struct* tstruct, string prefix) {
-  out <<
-    indent() << prefix << " = new " << type_name(tstruct) << "();" << endl <<
-    indent() << prefix << ".Read(iprot);" << endl;
+  if (union_ && tstruct->is_union()) {
+    out << indent() << prefix << " = " << type_name(tstruct) << ".Read(iprot);" << endl;
+  } else {
+    out <<
+      indent() << prefix << " = new " << type_name(tstruct) << "();" << endl <<
+      indent() << prefix << ".Read(iprot);" << endl;
+  }
 }
 
 void t_csharp_generator::generate_deserialize_container(ofstream& out, t_type* ttype, string prefix) {
@@ -1749,13 +1934,13 @@
     prefix << ".Add(" << elem << ");" << endl;
 }
 
-void t_csharp_generator::generate_serialize_field(ofstream& out, t_field* tfield, string prefix, bool is_element) {
+ void t_csharp_generator::generate_serialize_field(ofstream& out, t_field* tfield, string prefix, bool is_element, bool is_propertyless) {
   t_type* type = tfield->get_type();
   while (type->is_typedef()) {
     type = ((t_typedef*)type)->get_type();
   }
 
-  string name = prefix + prop_name(tfield);
+  string name = prefix + (is_propertyless ? "" : prop_name(tfield));
   
   if (type->is_void()) {
     throw "CANNOT GENERATE SERIALIZE CODE FOR void TYPE: " + name;
@@ -2209,5 +2394,6 @@
 "    wcf:             Adds bindings for WCF to generated classes.\n"
 "    serial:          Add serialization support to generated classes.\n"
 "    nullable:        Use nullable types for properties.\n"
+"    union:           Use new union typing, which includes a static read function for union types.\n"
 )
 
diff --git a/lib/csharp/src/Protocol/TAbstractBase.cs b/lib/csharp/src/Protocol/TAbstractBase.cs
new file mode 100644
index 0000000..de2e3db
--- /dev/null
+++ b/lib/csharp/src/Protocol/TAbstractBase.cs
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+namespace Thrift.Protocol
+{
+	public interface TAbstractBase
+	{
+		///
+		/// Writes the objects out to the protocol
+		///
+		void Write(TProtocol tProtocol);
+	}
+}
diff --git a/lib/csharp/src/Protocol/TBase.cs b/lib/csharp/src/Protocol/TBase.cs
index 1969bb3..b8b36fb 100644
--- a/lib/csharp/src/Protocol/TBase.cs
+++ b/lib/csharp/src/Protocol/TBase.cs
@@ -19,16 +19,11 @@
 
 namespace Thrift.Protocol
 {
-	public interface TBase
+	public interface TBase : TAbstractBase
 	{
 		///
 		/// Reads the TObject from the given input protocol.
 		///
 		void Read(TProtocol tProtocol);
-
-		///
-		/// Writes the objects out to the protocol
-		///
-		void Write(TProtocol tProtocol);
 	}
 }
diff --git a/lib/csharp/src/Thrift.csproj b/lib/csharp/src/Thrift.csproj
index f803830..ff00d19 100644
--- a/lib/csharp/src/Thrift.csproj
+++ b/lib/csharp/src/Thrift.csproj
@@ -79,6 +79,7 @@
   <ItemGroup>
     <Compile Include="Collections\THashSet.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Protocol\TAbstractBase.cs" />
     <Compile Include="Protocol\TBase.cs" />
     <Compile Include="Protocol\TBase64Utils.cs" />
     <Compile Include="Protocol\TBinaryProtocol.cs" />
