随笔分类 -  C#

摘要:系统数据库路径:C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB 用户数据库默认路径:C:\Users\Administrator 连接字符串: <c 阅读全文
posted @ 2025-01-04 20:46 竹楼风雨声 阅读(30) 评论(0) 推荐(0) 编辑
摘要:解决方法:关闭解决方案,打开解决方案所在文件夹,打开以下文件夹:.vs\ConsoleApp7\FileContentIndex,然后删除里面的所有文件,再重新在VS中打开解决方案重新生成即可 阅读全文
posted @ 2024-12-23 22:53 竹楼风雨声 阅读(126) 评论(0) 推荐(0) 编辑
摘要:示例1: class E { public IEnumerable MyGetEnumerator1() { yield return 1; } public IEnumerable<int> MyGetEnumerator2() { yield return 1; yield return 2; 阅读全文
posted @ 2024-09-28 21:17 竹楼风雨声 阅读(8) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 3 namespace ConsoleApp3_Test 4 { 5 6 internal class Aa 7 { 8 9 static void Main(string[] args) 10 { 11 Stock stock = new Stock("THPW 阅读全文
posted @ 2024-09-13 11:03 竹楼风雨声 阅读(12) 评论(0) 推荐(0) 编辑
摘要:public static readonly int b = a + 1; public static readonly int a = 1; public static readonly int c = 1; public static readonly int d = c + 1; public 阅读全文
posted @ 2024-09-06 13:51 竹楼风雨声 阅读(3) 评论(0) 推荐(0) 编辑
摘要:<Window x:Class="WpfApp1.Window2" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/x 阅读全文
posted @ 2024-08-18 11:15 竹楼风雨声 阅读(4) 评论(0) 推荐(0) 编辑
摘要:<WrapPanel x:Name="WrapPanelName"> <Border BorderThickness="1" BorderBrush="Blue"> <TextBox x:Name="tbFindAncestor" Text="{Binding RelativeSource={Rel 阅读全文
posted @ 2024-08-14 10:46 竹楼风雨声 阅读(9) 评论(0) 推荐(0) 编辑
摘要:<Window x:Class="WpfApp2.BindingTest5" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2 阅读全文
posted @ 2024-08-12 17:48 竹楼风雨声 阅读(17) 评论(0) 推荐(0) 编辑
摘要:部分代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using S 阅读全文
posted @ 2023-04-30 12:57 竹楼风雨声 阅读(39) 评论(0) 推荐(0) 编辑
摘要:一、SQL SERVER 连接字符串语法: 1、SQL SERVER验证(两种写法)(安全连接) string connStr = "Data Source=.;Initial Catalog=DatabaseName;User Id=sa;Password=123"; 或 string connS 阅读全文
posted @ 2023-04-09 17:48 竹楼风雨声 阅读(178) 评论(0) 推荐(0) 编辑
摘要:class A { public int num = 3; public void m1(B b) { b.m2(this); } } class B { public void m2(A a) { Console.WriteLine(a.num); } } class Test { public 阅读全文
posted @ 2022-11-07 19:58 竹楼风雨声 阅读(17) 评论(0) 推荐(0) 编辑
摘要:转载自:https://blog.csdn.net/fightHHA/article/details/81626383 https://blog.csdn.net/weixin_49199646/article/details/109492763?spm=1001.2101.3001.6650.8& 阅读全文
posted @ 2022-10-17 19:51 竹楼风雨声 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1、方法重写 class Parent { public void m1() { m2(); } public virtual void m2() { Console.WriteLine("I am Parent."); } } class Child : Parent { public overr 阅读全文
posted @ 2022-10-09 20:16 竹楼风雨声 阅读(18) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示