流浪のwolf

卷帝

导航

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 73 下一页

2023年10月16日

C# 如何理解装箱和拆箱 ?

摘要: 装箱和拆箱就是C# 中数据类型的转换 ; 装箱:值类型转换对象类型(引用类型,复杂类型) 拆箱:对象类型转换值类型 object obj=null; //引用类型 obj=1; //装箱 boxing 把值类型包装为引用类型 int i=(int)obj; //拆箱 unboxing 阅读全文

posted @ 2023-10-16 15:05 流浪のwolf 阅读(3) 评论(0) 推荐(0) 编辑

2023年10月12日

C# Webapi 简单的依赖注入-构造函数

摘要: 控制器部分: using Microsoft.AspNetCore.Mvc; using WebApplication1.IServices; using WebApplication1.Utility.SwaggerExt; namespace WebApplication1.Controller 阅读全文

posted @ 2023-10-12 19:23 流浪のwolf 阅读(31) 评论(0) 推荐(0) 编辑

C# webapi 跨域

摘要: #region 启用跨域访问 app.UseCors(builder => builder .AllowAnyMethod() .SetIsOriginAllowed(_ => true) .AllowAnyHeader() .AllowCredentials() ); #endregion app 阅读全文

posted @ 2023-10-12 09:19 流浪のwolf 阅读(72) 评论(0) 推荐(0) 编辑

2023年10月11日

简单 webapi 登录成功就返回 电脑的进程信息·

摘要: /// <summary> /// 如果登录成功就返回电脑的进程信息 /// </summary> /// <returns></returns> [HttpPost] public LoginResponse Login(LoginRequest req) { if(req.UserName == 阅读全文

posted @ 2023-10-11 21:44 流浪のwolf 阅读(5) 评论(0) 推荐(0) 编辑

webapi action 参数

摘要: 使用地址参数传递(queryString)数据:eg:http://localhost:5063/WeatherForecast?age=123 /// <summary> /// GET方法 /// </summary> /// <returns></returns> [HttpGet(Name 阅读全文

posted @ 2023-10-11 21:43 流浪のwolf 阅读(2) 评论(0) 推荐(0) 编辑

2023年10月1日

C# efcode 新建表格数据 增删改查

摘要: using TestDbContext ctx = new TestDbContext(); var b1 = new Book { AuthorName = "杨中科", Title = "零基础趣学C语言", Price = 59.8, PubTime = new DateTime() }; v 阅读全文

posted @ 2023-10-01 19:41 流浪のwolf 阅读(43) 评论(0) 推荐(0) 编辑

2023年9月27日

CRLF the next time Git touches it warning: in the working copy of '', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of

摘要: git config --global core.autocrlf true 阅读全文

posted @ 2023-09-27 16:23 流浪のwolf 阅读(177) 评论(0) 推荐(0) 编辑

2023年9月26日

C # 的 IsNullOrEmpty

摘要: 作用:判断字符串是否是 null 或者 ”“ 如果是 null or ”“ 就返回 true IsNullOrEmpty是判断字符串的Null值和""值。如果字符串为空或为""都返回true。string.IsNullOrEmpty(null) 返回truestring.IsNullOrEmpty( 阅读全文

posted @ 2023-09-26 15:16 流浪のwolf 阅读(344) 评论(0) 推荐(0) 编辑

2023年9月18日

关于 vue3 中的 fragment 组件

摘要: vue3 中的模板中只能返回一个元素 ,否则报错,使用 fragment 组件可以返回多个元素标签 阅读全文

posted @ 2023-09-18 16:09 流浪のwolf 阅读(87) 评论(0) 推荐(0) 编辑

918 每天三个知识点其一

摘要: nslookup baidu.com 返回 域名的 ip nslookup的作用:解析域名,返回ip 阅读全文

posted @ 2023-09-18 16:02 流浪のwolf 阅读(1) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 73 下一页