c# datetime.

DateTime.DayOfWeek属性 (DateTime.DayOfWeek Property)

DateTime.DayOfWeek Property is used to return the day of the week.

DateTime.DayOfWeek属性用于返回星期几。

Syntax:

句法:

    DayOfWeek DateTime.DayOfWeek;

Return value:

返回值:

The return type of this Property is DayOfWeek, It returns the day of the week.

此属性的返回类型为DayOfWeek ,它返回星期几。

Example to demonstrate example of DateTime.DayOfWeek Property

示例,以演示DateTime.DayOfWeek属性的示例

using System;
namespace ConsoleApplication1
{class Program
{static void Main(string[] args)
{//creating an object of DateTime class
//and, initializing it with the current time
//using "Now"
DateTime dt = DateTime.Now;
//getting day of the week
string day = dt.DayOfWeek.ToString();
//printing the day of the week
Console.WriteLine("Day of the week is: " + day);
//just to print a new line
Console.WriteLine();
}
}
}

Output

输出量

Day of the week is: Thursday

翻译自: https://www.includehelp.com/dot-net/datetime-dayofweek.aspx

c# datetime.

c# datetime._C#| 带示例的DateTime.DayOfWeek属性相关推荐

  1. c# datetime._C#| DateTime.TimeOfDay属性(带示例)

    c# datetime. DateTime.TimeOfDay属性 (DateTime.TimeOfDay Property) DateTime.TimeOfDay Property is used ...

  2. c# datetime._C#| DateTime.Month属性与示例

    c# datetime. DateTime.Month属性 (DateTime.Month Property) DateTime.Month Property is used to get the m ...

  3. c# datetime._C#| DateTime.Year属性与示例

    c# datetime. DateTime.Month属性 (DateTime.Month Property) DateTime.Month Property is used to get the y ...

  4. c# datetime._C#| DateTime.AddTicks()方法与示例

    c# datetime. DateTime.AddTicks()方法 (DateTime.AddTicks() Method) DateTime.AddTicks() method is used t ...

  5. c# datetime._C#| DateTime.GetHashCode()方法与示例

    c# datetime. DateTime.GetHashCode()方法 (DateTime.GetHashCode() Method) DateTime.GetHashCode() method ...

  6. Java 8中的时间日期库DateTime API及示例

    点击蓝色"程序猿DD"关注我 回复"资源"获取独家整理的学习资料! Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理 ...

  7. sqlserver获取前一天的日期_Java8新特性时间日期库DateTime API及示例

    点击上方蓝字关注「程序新视界」 Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理.同样的,如果你现在依旧在项目中使用传统Date.Calendar和Simp ...

  8. java instant获取微秒转成日期格式_Java8新特性时间日期库DateTime API及示例

    点击上方蓝字关注「程序新视界」 Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理.同样的,如果你现在依旧在项目中使用传统Date.Calendar和Simp ...

  9. java system datetime_Java8新特性时间日期库DateTime API及示例

    Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理.同样的,如果你现在依旧在项目中使用传统Date.Calendar和SimpleDateFormat等API ...

最新文章

  1. Android:控件WebView显示网页
  2. CentOS6 kvm添加网卡桥接口脚本
  3. python三角形判断白盒测试的代码_进化的测试 软件测试,自动化测试,白盒测试,Python...
  4. android应用开发全程实录-实现甩动拨打和挂断电话
  5. Grid Coloring(AtCoder-2687)
  6. UITableView 协议方法中更好的 switch 使用方案
  7. verilog之门级相关知识
  8. [置顶] Jquery学习总结(二) jquery选择器详解
  9. 26.go test
  10. python中dbscan和kmeans_DBSCAN聚类教程及Python示例
  11. 数据结构-----平衡二叉树
  12. python批量处理图片统一尺寸
  13. 怎么把Epub转换成PDF格式?分享两种简单好用的转换方法
  14. Python基本语法一
  15. 正在载入中......loading页面的几种方法
  16. k8s部署-49-k8s日志采集的解决方案思路梳理
  17. 计算机考研380分能上什么学校,考研总分500考380难吗 能上什么学校
  18. 记录一下pageX,offsetX,clientX,offsetLeft,offsetWidth,pageYoffset,scrollTop,scrollY,等。原文摘自MDN文档库。保证正确。
  19. 工控机主板与ARM工控机主板有什么不同呢?
  20. mac M1 安装nvm步骤

热门文章

  1. java中怎么获取配置文件的值_java如何获取配置文件的值
  2. linux编辑java文本,linux下的文本编辑器VI的使用命令
  3. 学计算机随随便便上万,大学“最烧钱”专业排行榜,“家境一般”慎入,“土豪”请随意...
  4. oracle常用表查询,ORACLE EBS常用表及查询语句(最终整理版)
  5. java redis 面试题_Java开发人员怎么面试 常见Redis面试题有哪些
  6. android 获取已安装 错误代码,android获取手机已经安装的app信息
  7. nodejs mysql 返回json_python向mysql中存储JSON及Nodejs取出
  8. memcached 的基本命令
  9. Jmeter 老司机带你一小时学会Jmeter
  10. 【python】 time模块和datetime模块详解 【转】