差异化竞争阵地的所在【周技术进阶】-从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();
        }
    }
}
相关推荐
mudtools1 天前
.NET驾驭Word之力:理解Word对象模型核心 (Application, Document, Range)
c#·.net
侃侃_天下1 天前
最终的信号类
开发语言·c++·算法
echoarts1 天前
Rayon Rust中的数据并行库入门教程
开发语言·其他·算法·rust
Aomnitrix1 天前
知识管理新范式——cpolar+Wiki.js打造企业级分布式知识库
开发语言·javascript·分布式
大飞pkz1 天前
【设计模式】C#反射实现抽象工厂模式
设计模式·c#·抽象工厂模式·c#反射·c#反射实现抽象工厂模式
每天回答3个问题1 天前
UE5C++编译遇到MSB3073
开发语言·c++·ue5
伍哥的传说1 天前
Vite Plugin PWA – 零配置构建现代渐进式Web应用
开发语言·前端·javascript·web app·pwa·service worker·workbox
小莞尔1 天前
【51单片机】【protues仿真】 基于51单片机八路抢答器系统
c语言·开发语言·单片机·嵌入式硬件·51单片机
我是菜鸟0713号1 天前
Qt 中 OPC UA 通讯实战
开发语言·qt
JCBP_1 天前
QT(4)
开发语言·汇编·c++·qt·算法