0
0

I am creating an app that exports .fdp files using serialization. I have run into a small problem. event is a keyword in c# so I am looking for ideas as to how I can define a class named "event" that I can pass to the serializer.

Any suggestions?

  • You must to post comments
0
0

We don’t have a C# interface for the event system. Have you written your own? If so then it would be a wrapper and you can just call event something else?

  • You must to post comments
0
0

I think I found a couple of nifty solutions. One is to use the @ in front of the name which flags it as a string to the serializer and keeps the compiler happy, so the class deffinition is @event instead of just event.

The other super handy tool I found is xsd.exe, I have used this sparingly in the past but it is amazingly powerful when you get the hang of schema creation. Here’s a simple example:

  1. rename a project.fdp to project.xml
  2. run xsd on it, this will create a schema named project.xsd that you can visuallly edit in vis studio
  3. run xsd again with a few arguments -l:c# /c namespace:(yournamespace) project.xsd (your using the schema file this time, not the xml)
  4. kapow! you should now have a shiny new .cs file with all of your classes and types with which you can create designer project files!!
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.