Saturday, January 24, 2009

Custom Tool Property - Part 1

One friend of mine, developer, asked me about property custom tool.
So I start VS and try to put something what in my opinion is the name of a tool: XSD.EXE and VS gave me the message that, that tool cannot be found.



Picture 1 Setting Custom Tool ( With wrong value )





Picture 2 – Running custom tool ( with wrong settings )




Picture 3 – Result


So what next is there magic word for declaring Custom Tool to use XSD.EXE which is default when you use DataSet schema?
Yes, put MSDataSetGenerator in Custom Tool property and that will do the Magic.



Picture 4 – Setting the property




Picture 5 – Run the tool

And …



Picture 6 – XMLSchema1.cs is created

Friday, January 16, 2009

Adding xml comments

Having class like this:


using System;
using System.Collections.Generic;
using System.Text;

namespace ClassLibrary1
{
public class Class1
{
public string Method(int number, string name, DateTime date)
{
}
}
}

How easy is to put xml comments?

Very easy, just type /// before the class,method, property ...

And you will got this:


namespace ClassLibrary1
{
/// <summary>
///
/// </summary>
public class Class1
{
/// <summary>
///
/// </summary>
/// <param name="number"></param>
/// <param name="name"></param>
/// <param name="date"></param>
/// <returns></returns>
public string Method(int number, string name, DateTime date)
{
}
}
}