public void GivenAClassWithDataContractAndDataMember_WhenProperty2NoAttribute_ThenSerializedAllButNotNoAttribute() { // Arrange var x = new MyClass5() { MyProperty1 = 98765, MyProperty2 = "asdasdasd" }; // Act var stringClass = ContractObjectToXml(x); // Assert Assert.IsTrue(stringClass.Contains("98765")); Assert.IsFalse(stringClass.Contains("asdasdasd")); }
public void CallMethod() { MyClass5 myclass5 = new MyClass5(); myclass5.MyMethod <int>(3); }
bool Equals(MyClass5 other) { return(X == other.X); }