2012年9月5日

async await ,一步一步试用

摘要: public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder =Windows.ApplicationModel.Package.Current.InstalledLocation; ... 阅读全文

posted @ 2012-09-05 16:49 GIS-MAN 阅读(343) 评论(0) 推荐(0) 编辑

两数组是否“相等”?。NET 下

摘要: http://www.codesky.net/article/200912/124632.html在.NET 4.0中我们将看到数组方面有很大的改进,本文将给大家讨论的是.NET 4.0数组的新增功能,希望对大家用好.NET 4.0数组有所帮助。1 两数组是否“相等”?在实际开发中,有时我们需要比对两个数组是否拥有一致的元素,例如,以下两个数组由于拥有相同的元素,因此被认为是相等的:int[]arr1=newint[] { 1,2,3,4 }; int[]arr2=newint[] { 1,2,3,4 };在.NET早期版本中,要实现上述数组比对功能,必须自己动手编写一个函数,在其内部使用循环 阅读全文

posted @ 2012-09-05 14:47 GIS-MAN 阅读(1023) 评论(1) 推荐(0) 编辑

BitArray

摘要: using System; using System.Collections; public class SamplesBitArray { public static void Main() { // Creates and initializes several BitArrays. BitArray myBA1 = new BitArray( 5 ); BitArray myBA2 = new BitArray( 5, false ); byte[] myBytes = new byte[5] { 1, 2, 3, 4, 5 }... 阅读全文

posted @ 2012-09-05 14:43 GIS-MAN 阅读(251) 评论(0) 推荐(0) 编辑

File I/O in Windows Runtime

摘要: The following obtains a directory listing of all files in the documents folder:StorageFolder docsFolder = KnownFolders.DocumentsLibrary;IReadOnlyList<StorageFile> files = await docsFolder.GetFilesAsync();foreach (IStorageFile file in files)Debug.WriteLine (file.Name);The CreateFileQueryWithOpt 阅读全文

posted @ 2012-09-05 14:19 GIS-MAN 阅读(311) 评论(0) 推荐(0) 编辑

TCP in Windows Runtime(运行时)

摘要: Windows.Networking.Sockets namespaceAs with the .NET implementation, there are two primary classes to handle server and client roles. In WinRT, these are StreamSocketListener and StreamSocket.The following method starts a server on port 51111, and waits for a client to connect,It then reads a single 阅读全文

posted @ 2012-09-05 11:38 GIS-MAN 阅读(544) 评论(0) 推荐(0) 编辑

FlipView 知识准备

摘要: <FlipView x:Name = "flipView1" Width = "480" Height = "270" BorderBrush = "Black" BorderThickness ="1"> <FlipView.ItemTemplate> <DataTemplate> <Grid > <Image Width = "480" Height = "270" Source = "{ 阅读全文

posted @ 2012-09-05 10:29 GIS-MAN 阅读(288) 评论(0) 推荐(0) 编辑

导航