zoukankan      html  css  js  c++  java
  • C# 第五次作业

    这节课我们主要学习了String and Regular Expressions

    Introduction of Strings Computer was used for numeric munipulation:

    1. Most programs are concerned more with strings of characters than with strings of numbers.

    2. C# provide built-in support for a fully string type.

    3. C# string type and .NET System.String class.

    4. Build new string by System.Text.StringBuilder Class.

    5. System.Text.RegularExpressions.Regex Class.

    首先,string有不可变性▼

    然后我们讲了利用ToString将其他格式的字符串变成String格式的字符串,不过这个上次实验已经用过了所以应该算是复习吧。

    然后我们讲了Compare的用法:

    1. A negative integer, if the first string is less than the second string.

    2. 0, if the strings are equal.

    3. A positive integer, if the first string is greater than the second string.

    以下就是我用ABC来尝试的compare用法,可见他是一直比较直到遇到不同的一位然后判断大小▼

    然后我们讲了Using Regular Expressions:

    1. Regex System.Text.RegularExpressions namespace is the home of objects associated with regular expressions.

    2. The central class for regular expression support is Regex, which represents an immutable, compiled regular expression.

    以下就是Instance Regex的比较▼

    以下是Static Regex▼

    以上就是我这节课学习到的内容。

  • 相关阅读:
    分析WordPress数据表之用户表(功能篇)
    Android.mk简介:
    win10 mars xlog编译
    sudo apt-get install libstdc++6
    WebRTC 入门教程(二)| WebRTC信令控制与STUN/TURN服务器搭建
    Mars Android 接入指南
    Mars Sample 使用说明
    RxJava2 方法总结
    mqtt client api: 阻塞API
    idea使用git进行项目管理
  • 原文地址:https://www.cnblogs.com/luvianlan/p/4438503.html
Copyright © 2011-2022 走看看