上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 30 下一页
摘要: 这些是 C# 中用于增加和减少变量值的运算符,下面是它们的用法: 1.i++ (后增量运算符):先使用变量 i 的当前值,然后将 i 的值加 1。 int i = 0; int j = i++; // j = 0, i = 1 2.++i (前增量运算符):将 i 的值加 1,然后使用新值。 int 阅读全文
posted @ 2023-03-08 17:32 JohnYang819 阅读(966) 评论(0) 推荐(0)
摘要: (1) 点击“调试”,选择需要调试的可执行程序 (2) 点击“确定”后,打开程序,再点击“调试”-“窗口”-模块 (3)右键模块,选择“从内存中打开模块” (4)发现,已经可以调试了 阅读全文
posted @ 2023-02-27 16:34 JohnYang819 阅读(1594) 评论(0) 推荐(0)
摘要: C#代码: static void Main(string[] args) { int[] items = new int[] { 0,1,2,3,4}; int m = 3; List<int[]> allCombinations = GetCombinations(items, m); fore 阅读全文
posted @ 2023-02-04 15:33 JohnYang819 阅读(46) 评论(0) 推荐(0)
摘要: C#中的lock lock语法为: private object o = new object();//创建一个对象 public void Work() { lock(o)//锁住这个对象 { //做一些必须按照顺序做的事情 } } 相当于: private object o = new obje 阅读全文
posted @ 2023-01-03 12:56 JohnYang819 阅读(2730) 评论(0) 推荐(0)
摘要: (1)下载DirectXTK项目:https://github.com/microsoft/DirectXTK (2)VS 打开该项目,右键项目,生成依赖性-自定义 (3)勾选MeshContentTask(.targets,.props) (4)右键项目,添加现有项目 (5)添加.obj,或者.d 阅读全文
posted @ 2022-12-05 16:06 JohnYang819 阅读(234) 评论(0) 推荐(0)
摘要: public class PChangeTest:INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private void OnPropertyChanged(string prop 阅读全文
posted @ 2022-11-25 16:37 JohnYang819 阅读(65) 评论(0) 推荐(0)
摘要: public class Test { /// <summary> /// 静态字段初始化器会在调用静态构造器前运行。 /// 如果类型没有静态构造器,字段会在类型被使用前或运行时中更早的时间进行初始化. /// 静态字段初始化器按照字段声明的先后顺序运行。 /// </summary> publi 阅读全文
posted @ 2022-11-12 17:22 JohnYang819 阅读(371) 评论(0) 推荐(1)
摘要: 官网上好像并没有直接给相应的接口和方法。 发现一种有效的方法: 先说方法: ScrollViewer sv = flowScrollViewer.Template.FindName("PART_ContentHost", flowScrollViewer) as ScrollViewer; sv.S 阅读全文
posted @ 2022-11-02 14:59 JohnYang819 阅读(346) 评论(0) 推荐(0)
摘要: <UserControl x:Class="wpfTestStudio.textPlaceHolderDemo" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.mic 阅读全文
posted @ 2022-10-29 20:29 JohnYang819 阅读(138) 评论(0) 推荐(0)
摘要: public class A { } public class B : A { } public class C : A { } public static class Extension { public static void Test(B b) { Console.WriteLine("thi 阅读全文
posted @ 2022-10-25 10:22 JohnYang819 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 30 下一页