12 2012 档案

摘要:stringserverAction="设置";ServerAction sAction = (ServerAction)Enum.Parse(typeof(ServerAction), serverAction); if (Enum.IsDefined(typeof(ServerAction), sAction)) { //ok } 阅读全文
posted @ 2012-12-11 11:08 94cool 阅读(420) 评论(0) 推荐(0)
摘要:返回单位:米static double Distance(double lon1, double lat1, double lon2, double lat2) { double R = 6378137; //地球半径 lat1 = lat1 * Math.PI / 180.0; lat2 = lat2 * Math.PI / 180.0; double sa2 = Math.Sin((lat1 - lat2) / 2.0); double sb2... 阅读全文
posted @ 2012-12-10 14:29 94cool 阅读(626) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace MethodInfoInvokeDemo{ public class ReflectTest { public void MethodWithNoParaNoReturn() { Console.WriteLine("不带参数且不返回值的方法"); } public strin... 阅读全文
posted @ 2012-12-06 20:10 94cool 阅读(9492) 评论(0) 推荐(2)
摘要:public static Bitmap RotateImage(Image image, float angle) { if (image == null) throw new ArgumentNullException("image"); float dx = image.Width / 2.0f; float dy = image.Height / 2.0f; Bitmap rotatedBmp = new Bitmap(image.Width, image... 阅读全文
posted @ 2012-12-04 21:59 94cool 阅读(2347) 评论(0) 推荐(0)