
代码片段 C#
文章平均质量分 72
anghlq
这个作者很懒,什么都没留下…
展开
-
反射代码集
获取页面类的类型if (HostingEnvironment.VirtualPathProvider.FileExists(virtualPath)) ...{ Type compiledType = null; try ...{//Compiles a file given its virtual path a原创 2007-05-22 11:48:00 · 1405 阅读 · 0 评论 -
画五角星
static public void SetStart(Polygon polygon) { float xc = (float)polygon.Width / 2; float yc = (float)polygon.Height / 2; float r = xc; /原创 2008-11-27 20:04:00 · 1359 阅读 · 0 评论 -
silverlight code tmp
static public void AddClip(Canvas panel) { double width = double.IsNaN(panel.Width) ? panel.ActualWidth : panel.Width; double height = double.IsNaN(panel.Height) ? pane原创 2008-05-31 09:31:00 · 779 阅读 · 0 评论 -
Scoll for flex
xml version="1.0" encoding="utf-8"?>mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" creationComplete="init()" > mx:Script> [CDATA[ import mx.man原创 2008-05-25 05:06:00 · 788 阅读 · 0 评论 -
Linq sample
XML ...{ XDocument doc = XDocument.Load(StockXml); var query = from SAList in doc.Descendants("SAList") where ((DateT原创 2008-05-21 04:30:00 · 782 阅读 · 0 评论 -
C#的Socket编程代码片段
Code from shareCacheusing COM = MergeSystem.Indexus.WinServiceCommon;using COMO = MergeSystem.Indexus.WinServiceCommon.Udp.Command;public bool Send() { TcpClient client = null;原创 2007-11-15 16:15:00 · 2005 阅读 · 0 评论 -
获取虚拟路径的类
获取虚拟路径的类 if (HostingEnvironment.VirtualPathProvider.FileExists(virtualPath)) ...{ Type compiledType = null; try ...{ compiledType = Bu原创 2007-11-13 22:26:00 · 1224 阅读 · 0 评论 -
Flex E4X操作
var tmpXMLList:XMLList = DataFromWeb.Instance.MapData.monthMap.I.@label;//条件查询var tmpXMLList:XMLList = DataFromWeb.Instance.Value.Value.(@Id==value.attribute("valueId")).I.L; //嵌套xml的条件查询v原创 2008-01-28 17:10:00 · 2163 阅读 · 0 评论 -
.net2.0 配置节
configuration> configSections> section name="indexusNetSharedCache" type="MergeSystem.Indexus.WinServiceCommon.Configuration.Client.IndexusProviderSection, MergeSystem.Indexus.WinServiceCo原创 2007-10-26 16:54:00 · 933 阅读 · 0 评论 -
获取内存和CPU信息
using System.Collections;using System.Collections.Generic;using System.Management;using System.Text;namespace MergeSystem.Indexus.WinServiceCommon.SystemManagement...{ /**//// /// Represents原创 2007-10-26 16:37:00 · 1071 阅读 · 0 评论 -
序列化
public static byte[] ToBinary(AppCommand item) ...{ BinaryFormatter format = new BinaryFormatter(); MemoryStream str = new MemoryStream(); format.Seri原创 2007-10-26 16:36:00 · 766 阅读 · 0 评论 -
HTTPS的WEB Service访问
public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, System.Net.Security.SslPolicyErrors errors) { // 总是接受 return true; }原创 2012-08-07 10:01:16 · 695 阅读 · 0 评论