C# show Environment property info name and value retrieve, Maximize the Console Window based on window resolution
using System.Reflection; static void ShowEnvironmentInfoDemo()
{
Type type = typeof(Environment);
PropertyInfo[] pis = type.GetProperties();
if (pis != null && pis.Any())
{
Parallel.ForEach(pis, x =>
{
Console.WriteLine($"Name:{x.Name},value:{x.GetValue(x)}");
});
}
}
static void ConsoleWindowDemo()
{
try
{
Type type = typeof(Console);
PropertyInfo[] pis = type.GetProperties();
if (pis != null && pis.Any())
{
Parallel.ForEach(pis, x =>
{
Console.WriteLine($"Name:{x.Name},Value:{x.GetValue(x)}");
});
}
}
catch
{ }
}
static void MaximizeConsoleWindow()
{
Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);
}
C# show Environment property info name and value retrieve, Maximize the Console Window based on window resolution的更多相关文章
- SPRING IN ACTION 第4版笔记-第三章ADVANCING WIRING-006-给bean运行时注入值(Environment,Property文件)
一. 直观的给bean注入值如下: @Bean public CompactDisc sgtPeppers() { return new BlankDisc( "Sgt. Pepper's ...
- JavaScript的this用法
1. 全局代码中的this this在全局上下文中,它的值是全局对象本身(Global Object),在浏览器中就是Window Object,如下图示. 看下面几个例子: //Global sc ...
- Spring Environment(二)源码分析
Spring Environment(二)源码分析 Spring 系列目录(https://www.cnblogs.com/binarylei/p/10198698.html) Spring Envi ...
- Spring5参考指南:Environment
文章目录 Profiles PropertySource 使用@PropertySource Spring的Environment接口有两个关键的作用:1. Profile, 2.properties ...
- Spring系列15:Environment抽象
本文内容 Environment抽象的2个重要概念 @Profile 的使用 @PropertySource 的使用 Environment抽象的2个重要概念 Environment 接口表示当前应用 ...
- arcgis arcengine Using environment settings
In this topic About using environment settings Environment settings summary table About using enviro ...
- [WPF系列]-基础系列 Property Trigger, DataTrigger & EventTrigger
So far, we worked with styles by setting a static value for a specific property. However, using trig ...
- c# 获取系统版本,获取net framework 版本(Environment 类)
1.获取当前操作系统版本信息 使用Environment.OSVersion 属性 获取包含当前平台标识符和版本号的 OperatingSystem 对象. 命名空间: System程序集: ms ...
- DOM 中 Property 和 Attribute 的区别
原文地址:http://web.jobbole.com/83129/ property 和 attribute非常容易混淆,两个单词的中文翻译也都非常相近(property:属性,attribute: ...
随机推荐
- Python连载58-http协议简介
一.http协议实战 1.URL(Uniform Resource Located) (1)使用FFTP的URL,例如:ftp://rtfm.mit.edu (2)使用HTTP的URL,例如:http ...
- Dynamics 365 Portal 多语言
Dynamics 365 Portal 的多语言分两种情况: 1.通过定义两套记录来实现,如Web Link Set.Snippet Content,都是定义两套记录,分别关联不同的语言来实现 Web ...
- django补充CBV和FBV模式
django补充CBV和FBV模式FBV模式---函数:经常用的方式CBV模式---类CBV中url连接时函数名后面要接.as_view()class index(views.View): @... ...
- React路由基本的使用(一)
路由的基本使用 下载 npm i -D react-router react-router-dom APP.js ps==>NavLink 选中的时候 可以高亮 demo 是你自己添加的一个类哈 ...
- webpack 使用style-loader,css-loader添加css样式
// 注意:webpack 默认只能打包处理js类型的文件// 如果要处理非js类型文件,需要手动安装第三方加载器// 1安装npm install style-loader css-loader - ...
- 求连通块的面积 - BFS、DFS实现
本文以Leetcode中695.岛屿的最大面积题目为基础进行展开(题目
- UWP 在ShellPage.xaml.cs 中导航至其他页面引发System.Exception
最近有一个需求,需要App监测网络变化,并在网络变化的同时用户,你切网啦,并且导航至一个切网的特定页面. 和Android.iOS的小伙伴后共同发现,人家有一个类似”拦截器“的框架,可以拦截App发出 ...
- webpack4配置学习(一)
webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler).当 webpack 处理应用程序时,它会递归地构建一个依赖关系图(dependency gr ...
- Centos 下安装 PHP (新)
今天重新实践了下 CentOS 7.6 下安装 PHP7 并完成配置,总结了一条可以照其实现的套路. 安装 PHP 所需扩展 # yum install libxml2 libxml2-devel o ...
- Eigen对齐(加速)方案
Eigen库为了使用指令集(如SSE等)加速方案,通常采用字节对齐的方案.如果使用C++的标准库,如Vector,Map等,需要使用如下方案 std::map<int, Eigen::Vecto ...