C# 手機(jī)號(hào)中間四位星號(hào)顯示
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace ConsoleApp22
{class Program{static void Main(string[] args){Console.WriteLine("手
獨(dú)孤劍
2020-08-06 16:11
閱讀:3103
C# 實(shí)現(xiàn)Get, Post方法/// /// Get 數(shù)據(jù)/// /// 目標(biāo)Url/// public static string GetData(string url){try{string result = "";HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);httpWebRequ
獨(dú)孤劍
2020-08-06 16:08
閱讀:2276
C# 16進(jìn)制與byte數(shù)組相互轉(zhuǎn)換/// /// byte數(shù)組轉(zhuǎn)16進(jìn)制字符串/// /// byte數(shù)組/// public static string ByteArrayToHexString(byte[] data){StringBuilder sb = new StringBuilder(data.Length * 3);foreach (byte b
獨(dú)孤劍
2020-08-06 16:05
閱讀:3863
C# 獲取本年年末, 本年度最后一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本年度最后一天:{0}", GetYearLastDate(DateTime.Now));Console.Read();
獨(dú)孤劍
2020-08-06 16:04
閱讀:3964
C# 獲取本年年初, 本年度第一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本年度第一天:{0}", GetYearFirstDate(DateTime.Now));Console.Read();}//
獨(dú)孤劍
2020-08-06 16:03
閱讀:3073
C# 獲取本季季末, 本季最后一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本季最后一天:{0}", GetQuarterLastDate(DateTime.Now));Console.Read();}
獨(dú)孤劍
2020-08-06 16:01
閱讀:1206
C# 獲取本季季初, 本季度第一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本季度第一天:{0}", GetQuarterFirstDate(DateTime.Now));Console.Read();
獨(dú)孤劍
2020-08-06 16:00
閱讀:1705
C# 獲取本月月末, 本月最后一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本月最后一天:{0}", GetMonthLastDate(DateTime.Now));Console.Read();}//
獨(dú)孤劍
2020-08-06 15:58
閱讀:2094
C# 獲取本月月初, 本月第一天
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本月第一天:{0}", GetMonthFirstDate(DateTime.Now));Console.Read();}/// /
獨(dú)孤劍
2020-08-06 15:56
閱讀:3052
C# 獲取本周最后一天(以星期天為最后一天)
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本周最后一天:{0}", GetWeekLastDate(DateTime.Now));Consol
獨(dú)孤劍
2020-08-06 15:55
閱讀:1701
C# 獲取本周第一天(以星期一為第一天)
using System;namespace ConsoleApp2
{class Program{static void Main(string[] args){Console.WriteLine("本周第一天:{0}", GetWeekFirstDate(DateTime.Now));Console.Rea
獨(dú)孤劍
2020-08-06 15:54
閱讀:3167
C# 轉(zhuǎn)換字節(jié)大小、長(zhǎng)度, 根據(jù)字節(jié)大小范圍返回KB, MB, GB自適長(zhǎng)度using System;
using System.IO;namespace ConsoleApp19
{class Program{static void Main(string[] args){Console.WriteLine("1024*5 {0}", FileSize
獨(dú)孤劍
2020-08-06 15:32
閱讀:2705
C# 獲取, 讀取指定文件大小, 返回單位為字節(jié)
using System;
using System.IO;namespace ConsoleApp1
{class Program{static void Main(string[] args){long length = FileSize("D:\\001.txt");Console.WriteLine(leng
獨(dú)孤劍
2020-08-06 15:31
閱讀:3644
C# 將指定文件轉(zhuǎn)換成Base64字符串
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;namespace ConsoleApp18
{class Program{static void Main(string[] arg
獨(dú)孤劍
2020-08-06 15:30
閱讀:4444
C# 將文本字符串轉(zhuǎn)換Base64字符串
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;namespace ConsoleApp1
{class Program{static void Main(string[] args
獨(dú)孤劍
2020-08-06 15:28
閱讀:1456