亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C#給Word不同頁面設(shè)置不同背景

 更新時(shí)間:2021年02月10日 08:40:33   作者:E-iceblue  
這篇文章主要介紹了C#給Word不同頁面設(shè)置不同背景,文章圖文講解的很清晰,有對(duì)于這方面不懂得同學(xué)可以學(xué)習(xí)下

給Word文檔設(shè)置背景時(shí),通常只能針對(duì)整篇文檔設(shè)置統(tǒng)一的背景,如果需要對(duì)某些頁面單獨(dú)設(shè)置背景,則需要通過另外的方式來實(shí)現(xiàn)。本文通過C# 程序代碼演示如何來實(shí)現(xiàn)。并附VB.NET代碼作參考。

思路:通過在頁眉中添加形狀或者圖片,并將形狀或圖片平鋪(即設(shè)置形狀或圖片大小為頁面大小)到整個(gè)頁面。添加背景時(shí),通過添加形狀并設(shè)置形狀顏色來設(shè)置成純色背景效果;通過添加圖片來實(shí)現(xiàn)圖片背景效果。

本次程序運(yùn)行環(huán)境中包括:引入Spire.Doc.dll;.Net Framework 4.5.1

設(shè)置不同背景時(shí),分以下2種情況:

1. 只需設(shè)置首頁背景和其他頁面不同

1.1 設(shè)置純色背景

【C#】

using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;
using System.Drawing;

namespace DifferentBackground1
{
 class Program
 {
 static void Main(string[] args)
 {
  //加載Word測(cè)試文檔
  Document doc = new Document();
  doc.LoadFromFile("測(cè)試.docx");

  //獲取第一節(jié)
  Section section = doc.Sections[0];

  //設(shè)置首頁頁眉頁腳不同
  section.PageSetup.DifferentFirstPageHeaderFooter = true;

  //在首頁頁眉添加形狀
  HeaderFooter firstpageheader = section.HeadersFooters.FirstPageFooter;//獲取首頁頁眉
  firstpageheader.Paragraphs.Clear();//清除頁眉默認(rèn)的段落格式(因默認(rèn)頁眉格式中包含有一條橫線)
  Paragraph firstpara = firstpageheader.AddParagraph();//重新添加段落
  float width = section.PageSetup.PageSize.Width;//獲取頁面寬度、高度
  float height = section.PageSetup.PageSize.Height;
  ShapeObject shape = firstpara.AppendShape(width, height, ShapeType.Rectangle);//添加形狀
  shape.BehindText = true;//設(shè)置形狀襯于文字下方
  shape.HorizontalAlignment = ShapeHorizontalAlignment.Center;//設(shè)置對(duì)齊方式,鋪滿頁面
  shape.VerticalOrigin = VerticalOrigin.TopMarginArea;
  shape.FillColor = Color.LightBlue;//形狀顏色


  //在其他頁面的頁眉中添加形狀
  HeaderFooter otherheader = section.HeadersFooters.Header;
  otherheader.Paragraphs.Clear();
  Paragraph otherpara = otherheader.AddParagraph();
  ShapeObject shape1 = otherpara.AppendShape(width, height, ShapeType.Rectangle);
  shape1.BehindText = true;
  shape1.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  shape1.VerticalOrigin = VerticalOrigin.TopMarginArea;
  shape1.FillColor = Color.Pink;


  //保存文檔
  doc.SaveToFile("ColorBackground1.docx", FileFormat.Docx2013);
  System.Diagnostics.Process.Start("ColorBackground1.docx");
 }
 }
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields
Imports System.Drawing

Namespace DifferentBackground1
 Class Program
 Private Shared Sub Main(args As String())
  '加載Word測(cè)試文檔
  Dim doc As New Document()
  doc.LoadFromFile("測(cè)試.docx")

  '獲取第一節(jié)
  Dim section As Section = doc.Sections(0)

  '設(shè)置首頁頁眉頁腳不同
  section.PageSetup.DifferentFirstPageHeaderFooter = True

  '在首頁頁眉添加形狀
  Dim firstpageheader As HeaderFooter = section.HeadersFooters.FirstPageFooter
  '獲取首頁頁眉
  firstpageheader.Paragraphs.Clear()
  '清除頁眉默認(rèn)的段落格式(因默認(rèn)頁眉格式中包含有一條橫線)
  Dim firstpara As Paragraph = firstpageheader.AddParagraph()
  '重新添加段落
  Dim width As Single = section.PageSetup.PageSize.Width
  '獲取頁面寬度、高度
  Dim height As Single = section.PageSetup.PageSize.Height
  Dim shape As ShapeObject = firstpara.AppendShape(width, height, ShapeType.Rectangle)
  '添加形狀
  shape.BehindText = True
  '設(shè)置形狀襯于文字下方
  shape.HorizontalAlignment = ShapeHorizontalAlignment.Center
  '設(shè)置對(duì)齊方式,鋪滿頁面
  shape.VerticalOrigin = VerticalOrigin.TopMarginArea
  shape.FillColor = Color.LightBlue
  '形狀顏色

  '在其他頁面的頁眉中添加形狀
  Dim otherheader As HeaderFooter = section.HeadersFooters.Header
  otherheader.Paragraphs.Clear()
  Dim otherpara As Paragraph = otherheader.AddParagraph()
  Dim shape1 As ShapeObject = otherpara.AppendShape(width, height, ShapeType.Rectangle)
  shape1.BehindText = True
  shape1.HorizontalAlignment = ShapeHorizontalAlignment.Center
  shape1.VerticalOrigin = VerticalOrigin.TopMarginArea
  shape1.FillColor = Color.Pink


  '保存文檔
  doc.SaveToFile("ColorBackground1.docx", FileFormat.Docx2013)
  System.Diagnostics.Process.Start("ColorBackground1.docx")
 End Sub
 End Class
End Namespace

1.2 設(shè)置圖片背景

【C#】

using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;

namespace DifferentBackground1
{
 class Program
 {
 static void Main(string[] args)
 {
  //加載Word測(cè)試文檔
  Document doc = new Document();
  doc.LoadFromFile("測(cè)試.docx");

  //獲取第一節(jié)
  Section section = doc.Sections[0];

  //設(shè)置首頁頁眉頁腳不同
  section.PageSetup.DifferentFirstPageHeaderFooter = true;

  HeaderFooter firstpageheader = section.HeadersFooters.FirstPageFooter;//獲取首頁頁眉
  firstpageheader.Paragraphs.Clear();//清除頁眉默認(rèn)的段落格式(因默認(rèn)頁眉格式中包含有一條橫線)
  Paragraph firstpara = firstpageheader.AddParagraph();//重新添加段落

  //獲取頁面寬度、高度
  float width = section.PageSetup.PageSize.Width;
  float height = section.PageSetup.PageSize.Height; 
  
  //添加圖片到首頁頁眉
  DocPicture pic0 = firstpara.AppendPicture("1.png");
  pic0.TextWrappingStyle = TextWrappingStyle.Behind;
  pic0.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  pic0.VerticalOrigin = VerticalOrigin.TopMarginArea;
  pic0.Width = width;
  pic0.Height = height;


  //在其他頁面的頁眉中添加圖片
  HeaderFooter otherheader = section.HeadersFooters.Header;
  otherheader.Paragraphs.Clear();
  Paragraph otherpara = otherheader.AddParagraph();
  DocPicture pic1 = otherpara.AppendPicture("2.png");
  pic1.TextWrappingStyle = TextWrappingStyle.Behind;
  pic1.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  pic1.VerticalOrigin = VerticalOrigin.TopMarginArea;
  pic1.Width = width;
  pic1.Height = height;


  //保存文檔
  doc.SaveToFile("ImageBackground1.docx", FileFormat.Docx2013);
  System.Diagnostics.Process.Start("ImageBackground1.docx");
 }
 }
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields

Namespace DifferentBackground1
 Class Program
 Private Shared Sub Main(args As String())
  '加載Word測(cè)試文檔
  Dim doc As New Document()
  doc.LoadFromFile("測(cè)試.docx")

  '獲取第一節(jié)
  Dim section As Section = doc.Sections(0)

  '設(shè)置首頁頁眉頁腳不同
  section.PageSetup.DifferentFirstPageHeaderFooter = True

  Dim firstpageheader As HeaderFooter = section.HeadersFooters.FirstPageFooter
  '獲取首頁頁眉
  firstpageheader.Paragraphs.Clear()
  '清除頁眉默認(rèn)的段落格式(因默認(rèn)頁眉格式中包含有一條橫線)
  Dim firstpara As Paragraph = firstpageheader.AddParagraph()
  '重新添加段落
  '獲取頁面寬度、高度
  Dim width As Single = section.PageSetup.PageSize.Width
  Dim height As Single = section.PageSetup.PageSize.Height

  '添加圖片到首頁頁眉
  Dim pic0 As DocPicture = firstpara.AppendPicture("1.png")
  pic0.TextWrappingStyle = TextWrappingStyle.Behind
  pic0.HorizontalAlignment = ShapeHorizontalAlignment.Center
  pic0.VerticalOrigin = VerticalOrigin.TopMarginArea
  pic0.Width = width
  pic0.Height = height


  '在其他頁面的頁眉中添加圖片
  Dim otherheader As HeaderFooter = section.HeadersFooters.Header
  otherheader.Paragraphs.Clear()
  Dim otherpara As Paragraph = otherheader.AddParagraph()
  Dim pic1 As DocPicture = otherpara.AppendPicture("2.png")
  pic1.TextWrappingStyle = TextWrappingStyle.Behind
  pic1.HorizontalAlignment = ShapeHorizontalAlignment.Center
  pic1.VerticalOrigin = VerticalOrigin.TopMarginArea
  pic1.Width = width
  pic1.Height = height


  '保存文檔
  doc.SaveToFile("ImageBackground1.docx", FileFormat.Docx2013)
  System.Diagnostics.Process.Start("ImageBackground1.docx")
 End Sub
 End Class
End Namespace

2. 設(shè)置指定多個(gè)頁面背景不同

注:給多個(gè)頁面設(shè)置不同背景時(shí),需要通過獲取不同節(jié)的頁眉來設(shè)置,本次程序環(huán)境中所用源文檔已設(shè)置了多個(gè)節(jié),如需手動(dòng)設(shè)置分節(jié),可參考代碼:

document.Sections[0].Paragraphs[0].InsertSectionBreak(SectionBreakType.NoBreak);

2.1 設(shè)置純色背景

【C#】

using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;
using System.Drawing;

namespace DifferentBackground2
{
 class Program
 {
 static void Main(string[] args)
 {
  //加載Word文檔
  Document doc = new Document();
  doc.LoadFromFile("測(cè)試.docx");

  //獲取第一節(jié)
  Section section1 = doc.Sections[0];

  //獲取頁面寬度、高度
  float width = section1.PageSetup.PageSize.Width;
  float height = section1.PageSetup.PageSize.Height;

  //添加圖片到頁眉
  HeaderFooter header1 = section1.HeadersFooters.Header;
  header1.Paragraphs.Clear();
  Paragraph para1 = header1.AddParagraph();
  ShapeObject shape1 = para1.AppendShape(width, height, ShapeType.Rectangle);//添加形狀
  shape1.BehindText = true;//設(shè)置形狀襯于文字下方
  shape1.HorizontalAlignment = ShapeHorizontalAlignment.Center;//設(shè)置對(duì)齊方式,鋪滿頁面
  shape1.VerticalOrigin = VerticalOrigin.TopMarginArea;
  shape1.FillColor = Color.LightSalmon;//形狀顏色

  //同理設(shè)置第二節(jié)頁眉中的形狀
  Section section2 = doc.Sections[1];
  HeaderFooter header2 = section2.HeadersFooters.Header;
  header2.Paragraphs.Clear();
  Paragraph para2 = header2.AddParagraph();
  ShapeObject shape2 = para2.AppendShape(width, height, ShapeType.Rectangle);//添加形狀
  shape2.BehindText = true;//設(shè)置形狀襯于文字下方
  shape2.HorizontalAlignment = ShapeHorizontalAlignment.Center;//設(shè)置對(duì)齊方式,鋪滿頁面
  shape2.VerticalOrigin = VerticalOrigin.TopMarginArea;
  shape2.FillColor = Color.Moccasin;//形狀顏色

  //同理設(shè)置第三節(jié)中的頁眉中的形狀
  Section section3 = doc.Sections[2];
  HeaderFooter header3 = section3.HeadersFooters.Header;
  header3.Paragraphs.Clear();
  Paragraph para3 = header3.AddParagraph();
  ShapeObject shape3 = para3.AppendShape(width, height, ShapeType.Rectangle);//添加形狀
  shape3.BehindText = true;//設(shè)置形狀襯于文字下方
  shape3.HorizontalAlignment = ShapeHorizontalAlignment.Center;//設(shè)置對(duì)齊方式,鋪滿頁面
  shape3.VerticalOrigin = VerticalOrigin.TopMarginArea;
  shape3.FillColor = Color.LawnGreen;//形狀顏色

  //保存文檔
  doc.SaveToFile("ColorBackground2.docx", FileFormat.Docx2013);
  System.Diagnostics.Process.Start("ColorBackground2.docx");
 }
 }
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields
Imports System.Drawing

Namespace DifferentBackground2
 Class Program
 Private Shared Sub Main(args As String())
  '加載Word文檔
  Dim doc As New Document()
  doc.LoadFromFile("測(cè)試.docx")

  '獲取第一節(jié)
  Dim section1 As Section = doc.Sections(0)

  '獲取頁面寬度、高度
  Dim width As Single = section1.PageSetup.PageSize.Width
  Dim height As Single = section1.PageSetup.PageSize.Height

  '添加圖片到頁眉
  Dim header1 As HeaderFooter = section1.HeadersFooters.Header
  header1.Paragraphs.Clear()
  Dim para1 As Paragraph = header1.AddParagraph()
  Dim shape1 As ShapeObject = para1.AppendShape(width, height, ShapeType.Rectangle)
  '添加形狀
  shape1.BehindText = True
  '設(shè)置形狀襯于文字下方
  shape1.HorizontalAlignment = ShapeHorizontalAlignment.Center
  '設(shè)置對(duì)齊方式,鋪滿頁面
  shape1.VerticalOrigin = VerticalOrigin.TopMarginArea
  shape1.FillColor = Color.LightSalmon
  '形狀顏色
  '同理設(shè)置第二節(jié)頁眉中的圖片
  Dim section2 As Section = doc.Sections(1)
  Dim header2 As HeaderFooter = section2.HeadersFooters.Header
  header2.Paragraphs.Clear()
  Dim para2 As Paragraph = header2.AddParagraph()
  Dim shape2 As ShapeObject = para2.AppendShape(width, height, ShapeType.Rectangle)
  '添加形狀
  shape2.BehindText = True
  '設(shè)置形狀襯于文字下方
  shape2.HorizontalAlignment = ShapeHorizontalAlignment.Center
  '設(shè)置對(duì)齊方式,鋪滿頁面
  shape2.VerticalOrigin = VerticalOrigin.TopMarginArea
  shape2.FillColor = Color.Moccasin
  '形狀顏色
  '同理設(shè)置第三節(jié)中的頁眉中的圖片
  Dim section3 As Section = doc.Sections(2)
  Dim header3 As HeaderFooter = section3.HeadersFooters.Header
  header3.Paragraphs.Clear()
  Dim para3 As Paragraph = header3.AddParagraph()
  Dim shape3 As ShapeObject = para3.AppendShape(width, height, ShapeType.Rectangle)
  '添加形狀
  shape3.BehindText = True
  '設(shè)置形狀襯于文字下方
  shape3.HorizontalAlignment = ShapeHorizontalAlignment.Center
  '設(shè)置對(duì)齊方式,鋪滿頁面
  shape3.VerticalOrigin = VerticalOrigin.TopMarginArea
  shape3.FillColor = Color.LawnGreen
  '形狀顏色
  '保存文檔
  doc.SaveToFile("ColorBackground2.docx", FileFormat.Docx2013)
  System.Diagnostics.Process.Start("ColorBackground2.docx")
 End Sub
 End Class
End Namespace

2.2 設(shè)置圖片背景

【C#】

using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;

namespace DifferentBackground2
{
 class Program
 {
 static void Main(string[] args)
 {
  //加載Word文檔
  Document doc = new Document();
  doc.LoadFromFile("測(cè)試.docx");

  //獲取第一節(jié)
  Section section1 = doc.Sections[0];
  //添加圖片到頁眉
  HeaderFooter header1 = section1.HeadersFooters.Header;
  header1.Paragraphs.Clear();
  Paragraph para1 = header1.AddParagraph();
  DocPicture pic1 = para1.AppendPicture("1.png");
  pic1.TextWrappingStyle = TextWrappingStyle.Behind;
  pic1.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  pic1.VerticalOrigin = VerticalOrigin.TopMarginArea;
  float width = section1.PageSetup.PageSize.Width;
  float height = section1.PageSetup.PageSize.Height;
  pic1.Width = width;
  pic1.Height = height;

  //同理設(shè)置第二節(jié)頁眉中的圖片
  Section section2 = doc.Sections[1];
  HeaderFooter header2 = section2.HeadersFooters.Header;
  header2.Paragraphs.Clear();
  Paragraph para2 = header2.AddParagraph();
  DocPicture pic2 = para2.AppendPicture("2.png");
  pic2.TextWrappingStyle = TextWrappingStyle.Behind;
  pic2.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  pic2.VerticalOrigin = VerticalOrigin.TopMarginArea; 
  pic2.Width = width;
  pic2.Height = height;

  //同理設(shè)置第三節(jié)中的頁眉中的圖片
  Section section3 = doc.Sections[2];
  HeaderFooter header3 = section3.HeadersFooters.Header;
  header3.Paragraphs.Clear();
  Paragraph para3 = header3.AddParagraph();
  DocPicture pic3 = para3.AppendPicture("3.png");
  pic3.TextWrappingStyle = TextWrappingStyle.Behind;
  pic3.HorizontalAlignment = ShapeHorizontalAlignment.Center;
  pic3.VerticalOrigin = VerticalOrigin.TopMarginArea;
  pic3.Width = width;
  pic3.Height = height;

  //保存文檔
  doc.SaveToFile("ImageBackground2.docx", FileFormat.Docx2013);
  System.Diagnostics.Process.Start("ImageBackground2.docx");
 }
 }
}

【VB.NET】

Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields

Namespace DifferentBackground2
 Class Program
 Private Shared Sub Main(args As String())
  '加載Word文檔
  Dim doc As New Document()
  doc.LoadFromFile("測(cè)試.docx")

  '獲取第一節(jié)
  Dim section1 As Section = doc.Sections(0)
  '添加圖片到頁眉
  Dim header1 As HeaderFooter = section1.HeadersFooters.Header
  header1.Paragraphs.Clear()
  Dim para1 As Paragraph = header1.AddParagraph()
  Dim pic1 As DocPicture = para1.AppendPicture("1.png")
  pic1.TextWrappingStyle = TextWrappingStyle.Behind
  pic1.HorizontalAlignment = ShapeHorizontalAlignment.Center
  pic1.VerticalOrigin = VerticalOrigin.TopMarginArea
  Dim width As Single = section1.PageSetup.PageSize.Width
  Dim height As Single = section1.PageSetup.PageSize.Height
  pic1.Width = width
  pic1.Height = height

  '同理設(shè)置第二節(jié)頁眉中的圖片
  Dim section2 As Section = doc.Sections(1)
  Dim header2 As HeaderFooter = section2.HeadersFooters.Header
  header2.Paragraphs.Clear()
  Dim para2 As Paragraph = header2.AddParagraph()
  Dim pic2 As DocPicture = para2.AppendPicture("2.png")
  pic2.TextWrappingStyle = TextWrappingStyle.Behind
  pic2.HorizontalAlignment = ShapeHorizontalAlignment.Center
  pic2.VerticalOrigin = VerticalOrigin.TopMarginArea
  pic2.Width = width
  pic2.Height = height

  '同理設(shè)置第三節(jié)中的頁眉中的圖片
  Dim section3 As Section = doc.Sections(2)
  Dim header3 As HeaderFooter = section3.HeadersFooters.Header
  header3.Paragraphs.Clear()
  Dim para3 As Paragraph = header3.AddParagraph()
  Dim pic3 As DocPicture = para3.AppendPicture("3.png")
  pic3.TextWrappingStyle = TextWrappingStyle.Behind
  pic3.HorizontalAlignment = ShapeHorizontalAlignment.Center
  pic3.VerticalOrigin = VerticalOrigin.TopMarginArea
  pic3.Width = width
  pic3.Height = height

  '保存文檔
  doc.SaveToFile("ImageBackground2.docx", FileFormat.Docx2013)
  System.Diagnostics.Process.Start("ImageBackground2.docx")
 End Sub
 End Class
End Namespace

到此這篇關(guān)于C#給Word不同頁面設(shè)置不同背景的文章就介紹到這了,更多相關(guān)C#給Word設(shè)置背景內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • C# LINQ的基本使用方法示例

    C# LINQ的基本使用方法示例

    這篇文章主要給大家介紹了關(guān)于C# LINQ的基本使用教程,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用C# LINQ具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • C#簡(jiǎn)單爬蟲案例分享

    C#簡(jiǎn)單爬蟲案例分享

    這篇文章主要為大家分享了C#簡(jiǎn)單爬蟲案例,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-10-10
  • 同時(shí)兼容JS和C#的RSA加密解密算法詳解(對(duì)web提交的數(shù)據(jù)加密傳輸)

    同時(shí)兼容JS和C#的RSA加密解密算法詳解(對(duì)web提交的數(shù)據(jù)加密傳輸)

    這篇文章主要給大家介紹了關(guān)于同時(shí)兼容JS和C#的RSA加密解密算法,通過該算法可以對(duì)web提交的數(shù)據(jù)進(jìn)行加密傳輸,文中通過圖文及示例代碼介紹的非常詳細(xì),需要的朋友們可以參考借鑒,下面來一起看看吧。
    2017-07-07
  • C# .Net8 switch的用法小結(jié)

    C# .Net8 switch的用法小結(jié)

    在 .net 8中,switch 不需要再和傳統(tǒng)的寫法一樣了,會(huì)更加的方便,本文主要介紹了C# .Net8 switch的用法小結(jié),具有一定的參考價(jià)值,感興趣的可以了解一下
    2024-05-05
  • C#連接MySql數(shù)據(jù)庫的方法

    C#連接MySql數(shù)據(jù)庫的方法

    最近兩天在解決C#連接MySql數(shù)據(jù)庫的問題,通過不同的從網(wǎng)上學(xué)習(xí),最終找到了解決的辦法,現(xiàn)在和大家分享一下
    2013-10-10
  • 利用C#守護(hù)Python進(jìn)程的方法

    利用C#守護(hù)Python進(jìn)程的方法

    這篇文章主要給大家介紹了關(guān)于如何利用C#守護(hù)Python進(jìn)程的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用C#具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-10-10
  • c#文件名/路徑處理方法示例

    c#文件名/路徑處理方法示例

    這篇文章主要介紹了c#文件名/路徑處理方法,大家寫代碼處理文件的時(shí)候會(huì)常用到
    2013-12-12
  • C#實(shí)現(xiàn)windows form限制文本框輸入的方法

    C#實(shí)現(xiàn)windows form限制文本框輸入的方法

    這篇文章主要介紹了C#實(shí)現(xiàn)windows form限制文本框輸入的方法,涉及C#限制文本框輸入的技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下
    2015-04-04
  • VS2019 找不到資產(chǎn)文件 “xxxx\obj\project.assets.json”運(yùn)行NuGet包還原以生成此文件(解決方案)

    VS2019 找不到資產(chǎn)文件 “xxxx\obj\project.assets.json”運(yùn)行NuGet包還原以生成此文

    這篇文章主要介紹了VS2019 找不到資產(chǎn)文件 “xxxx\obj\project.assets.json”運(yùn)行NuGet包還原以生成此文件,本文給大家分享解決方案,感興趣的朋友跟隨小編一起學(xué)習(xí)吧
    2020-08-08
  • C#泛型編程介紹

    C#泛型編程介紹

    泛型:通過參數(shù)化類型來實(shí)現(xiàn)在同一份代碼上操作多種數(shù)據(jù)類型。利用“參數(shù)化類型”將類型抽象化,從而實(shí)現(xiàn)靈活的復(fù)用
    2013-09-09

最新評(píng)論