差异化竞争阵地的所在【周技术进阶】-从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();
        }
    }
}
相关推荐
Scout-leaf1 天前
WPF新手村教程(三)—— 路由事件
c#·wpf
用户298698530142 天前
程序员效率工具:Spire.Doc如何助你一键搞定Word表格排版
后端·c#·.net
mudtools3 天前
搭建一套.net下能落地的飞书考勤系统
后端·c#·.net
玩泥巴的3 天前
搭建一套.net下能落地的飞书考勤系统
c#·.net·二次开发·飞书
唐宋元明清21883 天前
.NET 本地Db数据库-技术方案选型
windows·c#
郑州光合科技余经理3 天前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
lindexi3 天前
dotnet DirectX 通过可等待交换链降低输入渲染延迟
c#·directx·d2d·direct2d·vortice
feifeigo1233 天前
matlab画图工具
开发语言·matlab
dustcell.3 天前
haproxy七层代理
java·开发语言·前端
norlan_jame3 天前
C-PHY与D-PHY差异
c语言·开发语言