整几个题给大家玩玩,看看“下盘功夫”怎样

不用编译器,回复你的答案。

感觉现在很多程序员老在追遂各种各样的新名词、新术语,别人把几个英语单词整一块,取出第一个字母,X除外,这年头,X牛啊,不在第一也优先取它,然后好像记住了这些缩写的意思,就是一个不会落伍的程序员,有些该学,理解思想是根,至于记不记得住那缩写,无关紧要吧,咱要做的是在自己的层面上有自己的新术语创立出来,让别人去记,大家说是不。举个例子吧,听棠.net就整一个什么什么(我对人名,地名,术语名这些记忆不敏感,上街要是跟人走,从不记路)出来(数据访问方面的),好东西来的,然后也出个缩写,这些东西的话,理解人家思路,拓展自家思路是本,看了人家的想法,自己在实战中就要运用人家的思想,用人家的东西还是自己再写,再扩展看实际情况。
反过来,有些基础的东西还是要记住,要清楚的,言归正传。

1.

 

None.gifinterface IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
class Father:IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public new void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif IGrandFather gf
= new Children();
InBlock.gif gf.F();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif


 

2.

 

None.gif
None.gif
None.gif
interface IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
class Father:IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public virtual void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public override void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif IGrandFather gf
= new Children();
InBlock.gif gf.F();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}


 3.

None.gif
None.gif
interface IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
class Father:IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public virtual void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F(string arg)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren:{0}",arg);
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif IGrandFather gf
= new Children();
InBlock.gif gf.F();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif

 

4.

None.gif
None.gif
interface IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
abstract class Father:IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif IGrandFather gf
= new Children();
InBlock.gif gf.F();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif


5.

None.gif
None.gif
interface IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
abstract class Father:IGrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public virtual void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren:{0}");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif IGrandFather gf
= new Children();
InBlock.gif gf.F();
InBlock.gif Console.ReadLine();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif


6.

None.gif
None.gif
interface GrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
void F();
ExpandedBlockEnd.gif}

None.gif
class Father:GrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nFather.");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Children:Father,GrandFather
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public new void F()
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"\nChildren");
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif GrandFather gf
= new Children();
InBlock.gif gf.F();
InBlock.gif Console.ReadLine();
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

7.readonly和const 最本质的区别在哪?

8.编写类型转换时,是别的类型转为自身用隐式转换,还是反之用隐式?

9.这段代码呢?

None.gifusing System;
None.gif
None.gif
class A
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public virtual void F(string p)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(p);
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class B:A
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public void F(ref string p)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif Console.WriteLine(
"ref:"+p);
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif
class Test
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
InBlock.gif
public static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
string s = "xxxx";
InBlock.gif B b
= new B();
InBlock.gif b.F(s);
InBlock.gif b.F(
ref s);
ExpandedSubBlockEnd.gif }

ExpandedBlockEnd.gif}

None.gif

转载于:https://www.cnblogs.com/think/archive/2005/04/21/142460.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/265014.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

1-9-假期训练心得(dp+bfs)

题目一:传送门 思路:就是简单的bfs,注意仔细审题,加上对转弯次数的判断。 题目二:传送门 思路:简单dp,记录每一秒每个位置接到的大饼的数量。 状态转移方程:dp[i][j]max(dp[i][j] , …

Jlink commander、MCU GD32启动方式、Bootloader

摘自:学会如何使用jlink commander等 地址:https://www.bilibili.com/video/BV18b4y1C76i?spm_id_from333.999.0.0 摘自:Jlink使用技巧系列教程索引 地址:https://blog.csdn.net/whik1194/article/details/86525103

在eclipse中,怎么改变字体大小?

在eclipse中,怎么改变字体大小? 菜单栏里面点Window->Preference->General->Appearance->Colors and Fonts,再在右边的框里选Java->Java Editor Text Font(overrides default:Text Font),然后再点右边的Edit按钮,编辑好了点确…

基于javascript的asp数据库操作类,含分页、字符串截取、用户登陆验证[原创]

2005.01.15发表于blog.csdn.net/zxub无聊又用了用asp,发现还是不爽,已经习惯了面向对象了,就想改进了,vbscript不用,感觉看起来很不爽,就用javascript写了下面个类:<%//// //// 用Javascript实现的一个数据库操作类 //// ////function D…

atcoder A - Frog 1(DP)

A - Frog 1 Time Limit: 2 sec / Memory Limit: 1024 MB Score : 100100 points Problem Statement There are NN stones, numbered 1,2,…,N1,2,…,N. For each ii (1≤i≤N1≤i≤N), the height of Stone ii is hihi. There is a frog who is initially on Stone 11. He will…

物联网通讯协议:MQTT,NB-IOT,Zigbee,CoAP,RFID,BLUETOOTH,NFC,4G,HTTP

更多干货推荐可以去牛客网看看&#xff0c;他们现在的IT题库内容很丰富&#xff0c;属于国内做的很好的了&#xff0c;而且是课程刷题面经求职讨论区分享&#xff0c;一站式求职学习网站&#xff0c;最最最重要的里面的资源全部免费&#xff01;&#xff01;&#xff01;点击进…

【转】关于WaterFall瀑布流式布局的性能优化

市面上已存在的瀑布流式布局的网站&#xff1a;拼范网&#xff1a;http://www.pinfun.com/迷尚网&#xff1a;http://www.mishang.com/凡客达人&#xff1a;http://star.vancl.com/美丽说&#xff1a;http://www.meilishuo.com/蘑菇街&#xff1a;http://www.mogujie.com/welco…

微软OTech第二次会议(广州站)

很荣运又有机会参与微软的活动&#xff0c;也很高兴能加入到旨在促进Office技术交流的俱乐部(OTEC)&#xff0c;在这里让我对Office有了更深入的理解&#xff0c;目前的Office远非以前Office所能比拟。也远不止简单的Word、Excel电子文档表格办公自动化这些功能。目前中国大陆O…

Work Tips

目录IAR环境下&#xff0c;使用Live Watch实时监控变量值IAR替换mcu库Linux中删除swp文件使用J-Link通过SWD接口直接下载.hex文件和.bin文件到MCU(下载J-Flash软件)linux设置时间命令Jlink无法识别排查方法IAR环境下&#xff0c;使用Live Watch实时监控变量值 循环放在数组里&…

ECMA6--字符串/数组

字符串 新增两个字符串方法 startsWith&#xff08;&#xff09; 字符串首开通检测 endsWith&#xff08;&#xff09; 后缀名检测 includes &#xff08;&#xff09; 字符串中是否包含 字符串模板 数组 let title 头部 let content 内容 let a <div>\<p>titl…

[总结]DataGrid 固定表头实现(纵向和横向滚动条滚动,而Header不动)

1.用Css来定制DataGrid表头HeaderStyle的cssclass属性.fixTitle{ /*background: navy; color: white;*/ position: relative; top: expression(this.offsetParent.scrollTop);} 1<DIV style"Z-INDEX: 102; LEFT: 264px; OVERFLOW: auto; WIDTH: 184px;TOP: 128px; HEIG…

Fedora 20 安装后的一些事情

1、关闭selinux 可以在软件中,找到selinux管理工具:system-config-selinux.py 2、安装源 可以通过# ls -l /etc/yum.repos.d 查看现有的安装源,另外还可以给一些其他软件源&#xff1a; 添加remi,Remi repository 是包含最新版本 PHP 和 MySQL 包的 Linux 源&#xff0c;由 Rem…

STM32使用SPI通信驱动2.4G无线射频模块发送数据

目录SPI介绍SPI接口原理SPI工作原理SPI特征引脚配置结构体库函数SPI配置过程SPI.hSPI.cNRF24L01无线射频模块NRF24L01厂家驱动代码移植NRF24L01.hNRF24L01.cmain.c串口打印调试SPI介绍 SPI接口原理 SPI工作原理 SPI特征 引脚配置 结构体 库函数 SPI配置过程 SPI.h #ifndef __…

1.Rabbitmq学习记录《本质介绍,协议AMQP分析》

1.RabbitMQ是一个由erlang开发的AMQP&#xff08;Advanced Message Queue &#xff09;的开源实现。 RabbitMQ的优势-: 除了Qpid&#xff0c;RabbitMQ是唯一一个实现了AMQP标准的消息服务器&#xff1b; 可靠性&#xff0c;RabbitMQ的持久化支持&#xff0c;保证了消息的稳定性…

“Unamed VM”无法初始化 0x80070539

当我们重新安装Windows Server 2012 R2以后&#xff0c;之前Hyper-V的虚拟机没有进行导出&#xff0c;那么我们重新导入虚拟机成功以后&#xff0c;启动它遇到了如下错误&#xff1a; 那么怎么办呢&#xff1f;用下面的poweshell命令就可以解决 Grant-VmConnectAccess -usernam…

要回家了,想到以后..

过几天就要回家了,剩下的工作还有一点没有完成.不过已经是无关大碍了.突然有种很烦的感觉.想想这个暑假的时间里面自己也算是经历不少了,可是回忆一下自己到底收获了什么,脑子里面却是一片空白,什么都想不到.本来是要动笔写篇"我的深圳之行"之类的东西的,可是却没有一…

JSON数据格式解析库(cJSON、Jansson)的使用在STM32上移植和使用

json | json-c使用入门 这篇讲的也不错&#xff0c;抽空看下(网络传输json数据) https://www.bilibili.com/video/av669454528?p3&spm_id_frompageDriver 目录轻量级C语言JSON解析库1.JSON与cJSONJSON —— 轻量级的数据格式JSON语法规则cJSON2.cJSON数据结构和设计思想3.…

cytoscape操作经验

1.cytoscape批量修改节点属性&#xff1f;首先要创建一个节点属性文档&#xff08;.txt),比如说drug1 1drug2 1complex1 0complex2 0第一列是名字&#xff0c;第二列是属性&#xff0c;用空格分开&#xff1b;然后导入节点属性&#xff0c;在Vizmapper中下拉的visual mapping b…

[ZJOI2007]棋盘制作 悬线法dp 求限制下的最大子矩阵

https://www.luogu.org/problemnew/show/P1169 第一次听说到这种dp的名称叫做悬线法&#xff0c;听起来好厉害 题意是求一个矩阵内的最大01交错子矩阵&#xff0c;开始想的是dp[2000][2000][2]维护这个位置向上向左扩充的矩阵最大长度之后n扫一遍&#xff0c;但是写起来发现并不…

TEA、XTEA、XXTEA加密解密算法

参考&#xff1a;TEA、XTEA、XXTEA加密解密算法 地址&#xff1a;https://blog.csdn.net/gsls200808/article/details/48243019 其他相关博文链接&#xff1a;tea系列加密算法学习笔记、TEA和XxTEA跨平台加密算法 XXTEA可以直接加密解密字符串吗&#xff1f; 如果是字符串加密&…