差异化竞争阵地的所在【周技术进阶】-从BS 项目C#最基础截取字符串方法开始

效果

代码

cs 复制代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppNumberOneHelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("hello world!2020Year!");
            
                 #region 2 截取字符串方法
            //
            string originalString = "Hello, World!";
            string truncatedString = originalString.Substring(0, 5); // 截取从索引0开始的5个字符;  会获取到Hello内容打印出来; 8.31
            Console.WriteLine(truncatedString);
            //截取前6个字符;
            string sixS = originalString.Substring(0, 6);
            Console.WriteLine(sixS);
            //W1
            string str = "业务为先,代码再写的顺序,才是正确的写代码入门的方式所在,以至于进阶所在!";

            string waterStr2 = str.Substring(0, 12);
            Console.WriteLine(waterStr2);




            #endregion
            Console.ReadLine();
        }
    }
}
相关推荐
EW Frontier1 天前
6G ISAC新范式:基于智能漏波天线的Wi‑Fi通感一体化系统设计与实测【附MATLAB+python代码】
开发语言·python·matlab·music·isac·doa·wi‑fi
楼田莉子1 天前
Linux网络:NAT_代理
linux·运维·服务器·开发语言·c++·后端
froginwe111 天前
jEasyUI 创建基础树形网格
开发语言
月昤昽1 天前
autoCAD二次开发 4.正多边形与collection区分
算法·c#·二次开发·autocad二次开发
Victory_20251 天前
c#定时器顺序控制写法
开发语言·c#·c#顺序控制+定时器
Cyber4K1 天前
【Python专项】Nginx访问日志分析时间范围处理示例
开发语言·python·nginx
中犇科技1 天前
郑州无代码APP开发公司哪家好呢?推荐
开发语言
周末也要写八哥1 天前
代码中的注释的重要性(二)
开发语言·python
江南十四行1 天前
Python生成器与协程:从迭代器到异步编程的进阶之路
开发语言·python
测试员周周1 天前
【AI测试功能3】AI功能测试的三层架构:单元测试 → 集成测试 → E2E测试——AI系统测试金字塔实战指南
开发语言·人工智能·python·功能测试·架构·单元测试·集成测试