WPF—ResourceDictionary

作者:追风剑情 发布于:2019-8-16 17:40 分类:C#

一、新建资源字典文件 Dictionary1.xaml <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/x...

阅读全文>>

标签: C#

评论(0) 浏览(2772)

WPF—INotifyPropertyChanged

作者:追风剑情 发布于:2019-8-16 14:45 分类:C#

示例 XAML <Window x:Class="WpfTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xm...

阅读全文>>

标签: C#

评论(0) 浏览(2528)

WPF—PropertyMetadata

作者:追风剑情 发布于:2019-8-14 21:30 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Window...

阅读全文>>

标签: C#

评论(0) 浏览(2356)

委托与匿名方法

作者:追风剑情 发布于:2019-7-18 16:14 分类:C#

示例 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Test { delegate void Printer(string s); class Prog...

阅读全文>>

标签: C#

评论(0) 浏览(2823)

IEnumerable与IEnumerator

作者:追风剑情 发布于:2019-7-17 10:36 分类:C#

一、IEnumerable与IEnumerator之间的关系 namespace System.Collections { public interface IEnumerable { IEnumerator GetEnumerator(); } } namespace System.Collections { pub...

阅读全文>>

标签: C#

评论(0) 浏览(3015)

委托——Delegate.CreateDelegate()

作者:追风剑情 发布于:2019-7-8 16:02 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; namespace ReflectionMethodsCache { class Program { ...

阅读全文>>

标签: C#

评论(0) 浏览(4262)

XmlDocument

作者:追风剑情 发布于:2019-7-1 22:09 分类:C#

示例: test.xml <?xml version="1.0" encoding="UTF-8"?> <root> <book name="《三国演义》">内容摘要</book> <book name="《水浒专》">内容摘要</book> </root> ...

阅读全文>>

标签: C#

评论(0) 浏览(3046)

C#与Lua相互调用

作者:追风剑情 发布于:2019-7-1 16:25 分类:C#

这里使用NLua库 GitHub https://github.com/NLua/NLua Lua教程 https://www.runoob.com/lua/lua-tutorial.html 示例代码 using System; using System.Collections.Gen...

阅读全文>>

标签: C#

评论(0) 浏览(3481)

C#中的结构体(struct)

作者:追风剑情 发布于:2019-7-1 14:39 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace StructTest { class Program { static void Main(string[] args) ...

阅读全文>>

标签: C#

评论(0) 浏览(2191)

获取程序集信息(Assembly)

作者:追风剑情 发布于:2019-7-1 10:31 分类:C#

右键->属性->应用程序->程序集信息 示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection; namespace Assembly...

阅读全文>>

标签: C#

评论(0) 浏览(2119)

语言集成查询 (LINQ)

作者:追风剑情 发布于:2019-6-28 16:18 分类:C#

示例一:从数组中查询数据 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace LINQ { class Program { static voi...

阅读全文>>

标签: C#

评论(0) 浏览(2874)

WPF发布安装程序

作者:追风剑情 发布于:2019-6-26 21:25 分类:C#

一、下载并安装Visual Studio Installer https://marketplace.visualstudio.com/items?itemName=visualstudioclient.MicrosoftVisualStudio2017InstallerProjects 二、新建Setup Project工程 ...

阅读全文>>

标签: C#

评论(0) 浏览(4985)

WPF实现拖动

作者:追风剑情 发布于:2019-6-26 15:09 分类:C#

XAML官方文档 https://docs.microsoft.com/zh-cn/dotnet/framework/wpf/advanced/xaml-overview-wpf WPF实现拖动 示例:拖动UserControl 一、App.xml中定义拖动条样式 <Application x:Class="Test.App" xm...

阅读全文>>

标签: C#

评论(0) 浏览(6945)

ConditionalAttribute

作者:追风剑情 发布于:2019-5-6 18:13 分类:C#

示例:除非定义了相应的宏,否则忽略方法调用 #define TOOL_B using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp1 { class Pr...

阅读全文>>

标签: C#

评论(0) 浏览(2273)

判断用户使用的默认浏览器

作者:追风剑情 发布于:2019-3-24 23:25 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp2 { class Program { public enum BrowserApplication ...

阅读全文>>

标签: C#

评论(0) 浏览(2804)

IComparer<T>

作者:追风剑情 发布于:2019-3-15 22:30 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TSortTest { class Program { static void Main(string[] args) {...

阅读全文>>

标签: C#

评论(0) 浏览(2838)

BinaryFormatter

作者:追风剑情 发布于:2019-3-14 12:58 分类:C#

FCL提供了两个格式化器:BinaryFormatter和SoapFormatter(在System.Runtime.Serialization.Formatters.Soap命名空间中定义,System.Runtime.Serialization.Formatters.Soap.dll程序集中)。 注意:从.NET Framework 3.5开始便废了SoapFormatter类,不...

阅读全文>>

标签: C#

评论(0) 浏览(3242)

WPF之HelloWorld

作者:追风剑情 发布于:2019-3-11 13:09 分类:C#

一、创建WPF工程 二、拖一个界面 三、给UI元件取名称 四、绑定事件 MainWindow.xaml <Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/...

阅读全文>>

标签: C#

评论(0) 浏览(2355)

KeyValuePair<TKey, TValue>

作者:追风剑情 发布于:2018-12-4 11:44 分类:C#

示例 using System; using System.Collections.Generic; namespace Test3 { class Program { static void Main(string[] args) { KeyValuePair<string, int&...

阅读全文>>

标签: C#

评论(0) 浏览(2158)

一个简单的命令行解析工具类

作者:追风剑情 发布于:2018-12-1 18:39 分类:C#

示例代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp4 { class Program { static void Main(string[] args) ...

阅读全文>>

标签: C#

评论(0) 浏览(2328)

字符串首字母大小写转换

作者:追风剑情 发布于:2018-11-28 20:04 分类:C#

示例 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Test3 { class Program { static void Mai...

阅读全文>>

标签: C#

评论(0) 浏览(3478)

补位PadLeft()与PadRight()

作者:追风剑情 发布于:2018-11-27 21:22 分类:C#

示例 using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; namespace Test2 { class Program { static void Main(string[] args) ...

阅读全文>>

标签: C#

评论(0) 浏览(3049)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号