Skip to content

Instantly share code, notes, and snippets.

@KaanGaming
Last active July 6, 2018 20:02
Show Gist options
  • Save KaanGaming/02cf5658ad03291c15781bc9f067612e to your computer and use it in GitHub Desktop.
Save KaanGaming/02cf5658ad03291c15781bc9f067612e to your computer and use it in GitHub Desktop.
Example of using XML Documentations.
// This example will show you how to use XML to document everything.
using System;
namespace XMLExample
{
/// <summary>A Class about Geometric Shapes.</summary>
class Shape
{
public enum ShapeType
{
circle,
rectangle,
square,
triangle
}
private ShapeType _type;
/// <summary>Type of the shape.</summary>
public ShapeType Type
{
get
{
return _type;
}
set
{
_type = value;
}
}
private double _radius;
/// <summary>Size/Radius of the Shape.</summary>
public double Radius
{
get
{
return _type;
}
set
{
_type = value;
}
}
/// <param name="radius">Size/Radius of this shape. This parameter uses <see cref="System.Double"/>.</param>
/// <param name="type">Type of the shape. <see cref="Shape.ShapeType"> is an Enumerator of the class, Shape.</param>
public Shape(double radius, ShapeType type)
{
_radius = radius;
_type = type;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment