I saw this trick, thought it was cool.
#region
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.GraphicsInterface;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.LayerManager;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Colors;
using AcAp = Autodesk.AutoCAD.ApplicationServices;
using AcEd = Autodesk.AutoCAD.EditorInput;
using AcGe = Autodesk.AutoCAD.Geometry;
using AcRx = Autodesk.AutoCAD.Runtime;
using AcDb = Autodesk.AutoCAD.DatabaseServices;
using AcWd = Autodesk.AutoCAD.Windows;
//++-- cool use of using
using LispLisp = System.Collections.Generic.List<Autodesk.AutoCAD.DatabaseServices.TypedValue>;//++-- <<<-----
#endregion
[assembly: CommandClass(typeof(ExecMethod.Commands))]
//++--
namespace ExecMethod
{
public class Commands
{
[LispFunction("doit")]
public static Object doit(ResultBuffer buf)
{
Editor ed = AcAp.Application.DocumentManager.MdiActiveDocument.Editor;
try
{
if (buf == null)
return false;
LispLisp ll = new LispLisp(buf.AsArray());
ll.ForEach(X => ed.WriteMessage("\n{0}", X.Value));
}
catch (System.Exception ex)
{
ed.WriteMessage("\n" + ex.Message);
}
return true;
}
}
}