上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
摘要: public class Test { /// <summary> /// 静态字段初始化器会在调用静态构造器前运行。 /// 如果类型没有静态构造器,字段会在类型被使用前或运行时中更早的时间进行初始化. /// 静态字段初始化器按照字段声明的先后顺序运行。 /// </summary> publi 阅读全文
posted @ 2022-11-12 17:22 JohnYang819 阅读(294) 评论(0) 推荐(1) 编辑
摘要: 官网上好像并没有直接给相应的接口和方法。 发现一种有效的方法: 先说方法: ScrollViewer sv = flowScrollViewer.Template.FindName("PART_ContentHost", flowScrollViewer) as ScrollViewer; sv.S 阅读全文
posted @ 2022-11-02 14:59 JohnYang819 阅读(265) 评论(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 阅读(108) 评论(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 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 在计算机图形学中,摄像机/视图空间,是由自身定位点,目标点,向上向量确定。当摄像机旋转时,实质是其目标点发生了变化,下面就摄像机的旋转角度引起目标点的变化进行简单的推导。 上图是右手坐标系,其中目标点假定为p,p的旋转有两个角度,分别是pitch(即向上向下看,范围是90°~-90°,即从y的正轴, 阅读全文
posted @ 2022-10-02 10:34 JohnYang819 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 被引用的dll是testDllFr.dll,其代码为: namespace testDLLFr { public class TestA { public static void TestAM() { Console.WriteLine("TestAM"); } } public class Tes 阅读全文
posted @ 2022-09-29 19:03 JohnYang819 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 读取JSON文件 NuGet两个包:Microsoft.Extensions.Configuration,Mircosoft.Extensions.Configuration.Json。 { "name": "yjw", "age": 18, "proxy": {"address": "aa"} } 阅读全文
posted @ 2022-09-04 23:46 JohnYang819 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 依赖注入实际上是一种设计模式,它可以有效降低模块之间的耦合度。 基本思路: - 创建ServiceCollection对象 - 用ServiceCollection对象进行注册服务 - 用ServiceCollection创建ServiceProvider对象,通过ServiceProvider的G 阅读全文
posted @ 2022-09-03 23:15 JohnYang819 阅读(2073) 评论(0) 推荐(0) 编辑
摘要: 在ES6中,类中定义的方法,是放在原型对象的,供实例对象引用。 //创建一个Person类 class Person { constructor(name,age) { this.name = name; this.age = age; } } class Student extends Perso 阅读全文
posted @ 2022-07-31 11:28 JohnYang819 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 'use strict'; const SecretHolder = (function () { const secrets = new WeakMap(); return class { constructor() { this.test = secrets; } setSecrete(secr 阅读全文
posted @ 2022-07-23 16:42 JohnYang819 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页