C#
wodownload2
这个作者很懒,什么都没留下…
展开
-
swig导出c++类和函数给C#使用
https://blog.csdn.net/wenming111/article/details/103717431http://www.swig.org/Doc3.0/CSharp.html#CSharp_directors_implementationgit分支:mastergit地址:https://gitee.com/yichichunshui/swigcsharp.gitgit节点:19c948ed30147b93272c9cb213cf486064509247使用过程:定义一个简单的类pe原创 2022-06-20 14:49:39 · 627 阅读 · 0 评论 -
winform编程
C#打开另一个窗体 private void button5_Click(object sender, EventArgs e) { Form2 form2 = new Form2(); form2.ShowDialog(this);//这里一定要用ShowDialog,否则画面程序依旧会结束。 this.Close();//关闭Form2后,程序退出搜索 //然后在Form2的Load事件里写原创 2021-08-02 15:53:44 · 138 阅读 · 0 评论 -
C#中AppDomain.CurrentDomain.BaseDirectory及各种路径获取方法
// 获取程序的基目录。System.AppDomain.CurrentDomain.BaseDirectory// 获取模块的完整路径,包含文件名System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。System.Environment.CurrentDirectory// 获取应用程序的当前工作目录,注意工作目录是可以改变的,而不限定在程序所在目原创 2021-07-30 10:25:28 · 3446 阅读 · 0 评论 -
default关键字C#
https://blog.csdn.net/wcc27857285/article/details/96700760原创 2020-10-09 15:59:36 · 97 阅读 · 0 评论 -
为什么需要泛型
https://www.cnblogs.com/yueyue184/p/5032156.html原创 2020-10-09 15:55:40 · 63 阅读 · 0 评论 -
为什么需要抽象类
https://www.cnblogs.com/wzl0106/p/4810060.html原创 2020-10-09 15:48:56 · 156 阅读 · 0 评论 -
C# 读取bytes——工具类
https://referencesource.microsoft.com/#mscorlib/system/text/stringbuildercache.cs原创 2020-04-22 12:01:30 · 821 阅读 · 0 评论 -
C#结构体里面包含类
这样的内存分布是啥样子的呢?原创 2020-01-03 10:41:36 · 1182 阅读 · 1 评论 -
C# Attribute
https://www.runoob.com/csharp/csharp-attribute.htmlhttps://www.cnblogs.com/ldyblogs/p/attribute.html原创 2019-12-31 17:51:08 · 134 阅读 · 0 评论 -
C# AttributeUsage
https://www.cnblogs.com/wolf-sun/p/3396327.htmlhttps://developer.51cto.com/art/200909/151191.htm原创 2019-12-31 17:49:21 · 113 阅读 · 0 评论 -
.Net Memory Profiler的使用举例
代码:class Student{ public int a;}class Program{ static void Main(string[] args) { Student s = new Student(); s.a = 1; Console.ReadKey(); }}可以看到上面有一个...原创 2019-12-24 10:32:06 · 1194 阅读 · 0 评论 -
C# 查看IL代码
https://blog.csdn.net/susan19890313/article/details/6949685原创 2019-12-24 09:20:23 · 1397 阅读 · 0 评论 -
C#new出来的结构体内存分配
https://blog.csdn.net/c1sdn19/article/details/88402893原创 2019-12-20 16:16:12 · 2384 阅读 · 0 评论 -
关于C# 中system.IO sharing violation on path
System.IO.IOException: Sharing violation on pathif (!System.IO.File.Exists(filePath)){ //System.IO.File.Create(filePath); System.IO.File.Create(filePath);}检测文件是否存在,如果不存在,创建文件,提示出现sharing ...原创 2019-12-20 16:15:20 · 1772 阅读 · 0 评论 -
C#中的Conditional特性
https://blog.csdn.net/lym940928/article/details/80550497#define DEBUG2using System;using System.Diagnostics;namespace ThreadDemo{ class Program { [Conditional("DEBUG2")] ...原创 2019-12-19 20:13:02 · 210 阅读 · 0 评论 -
C#之Task和Thread
https://blog.csdn.net/qq_40677590/article/details/102797838原创 2019-11-29 17:14:27 · 255 阅读 · 0 评论 -
AutoResetEvent
在线程: static void ThreadLoad() { while (m_threadRunning) { m_LoadEvent.WaitOne();这个AutoResetEvent作用是啥?http://dotnetpattern.com/thread...原创 2019-11-29 16:45:32 · 158 阅读 · 0 评论 -
C#泛型类与接口
using System;using System.Collections;using System.Collections.Generic;namespace ConsoleApplication1{ /// <summary> /// 泛型接口 /// </summary> /// <typeparam name="T"></typeparam> in原创 2016-07-22 10:28:10 · 638 阅读 · 0 评论 -
C# Timer组件
窗体组件中的Timer组件。 1、添加 2、属性设置 设置:Enabled为true,表示可以运行; 设置:Interval为10,表示10秒调用一次;3、编写事件函数: 在此函数中添加你的逻辑即可。原创 2016-09-08 10:49:23 · 553 阅读 · 0 评论 -
__cplusplus宏
1、建立c的项目 使用vs能建立c的项目吗?可以,而且很简单。 添加一个后缀为.c的源文件。2、测试当前是不是c编译器。 测试代码:#include "stdio.h"int main(){#ifdef __cplusplus printf("hello");#endif return 0;}无输出,为c编译器。 3、建立cpp项目,只要将刚才的文件改为tes原创 2016-12-14 09:55:47 · 2112 阅读 · 0 评论 -
C# 索引器和运算符的重载
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication2{ class Program { class Array {原创 2017-02-09 20:34:39 · 411 阅读 · 0 评论 -
adb显示unity运行的log
1、下载android sdk 将adb.exe发送到桌面作为快捷方式。 2、添加过滤 3、编写unity打包成apk 4、安装到手机,运行此程序。当然需要usb线连手机,双击adb.exe就可以看到log信息了:原创 2017-04-10 17:59:45 · 1173 阅读 · 0 评论 -
C# 接口显示实现和隐式实现
c#中类可以实现多个接口,那么如果不同的接口有相同的方法名的话,此时需要显示实现。举例: 第1个接口:interface InterfaceA { void Say(); }第2个接口:interface InterfaceB { void Say(); }实现类:class Person:Inter...原创 2018-06-20 20:04:44 · 382 阅读 · 0 评论 -
C# struct 和class的区别
https://www.cnblogs.com/gsk99/archive/2011/05/20/1904552.html原创 2018-06-22 11:30:04 · 212 阅读 · 0 评论 -
vs添加链接文件
http://www.cnblogs.com/blackcore/archive/2010/10/18/1854108.html原创 2018-12-06 16:38:35 · 1874 阅读 · 0 评论 -
C#中双向链表LinkedList
class Program { static void Main(string[] args) { LinkedList<int> a = new LinkedList<int>(); a.AddFirst(3); a.AddLast(1); ...原创 2019-05-17 14:10:29 · 806 阅读 · 0 评论 -
C#中的排序
代码如下:using System;using System.Collections;using System.Collections.Generic;namespace ConsoleApplication1{ class Person:IComparable<Person> { public int age; public int grade;原创 2016-07-21 14:55:18 · 300 阅读 · 0 评论