2

I see two ways to create a MessageFault:

   FaultException fe = new FaultException("error");
   MessageFault f = fe.CreateMessageFault();

Or

   FaultCode fc = new FaultCode("error");
   MessageFault f = MessageFault.CreateFault(fc, "error");

What's the difference b/w two? Is anyone preferred?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Stranger
  • 21
  • 2

1 Answers1

1

There are many more ways to create a MessageFault than that. See MessageFault members.

All of these create an instance of the MessageFault class. The documentation tells you how they differ.

John Saunders
  • 160,644
  • 26
  • 247
  • 397