为什么C#区分大小写? [英] Why is C# Case Sensitive?

查看:215
本文介绍了为什么C#区分大小写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

后面这使得C#区分大小写存在什么道理?

What reasoning exists behind making C# case sensitive?

我在考虑从VB.NET转换到利用一些语言特性(CCR和产量),以及理解推理这种差异的背后可能使过渡更容易。

I'm considering switching from VB.NET to take advantage of some language features (CCR and yield), and understanding the reasoning behind this difference may make the transition easier.

[更新]
嗯,我的暴跌三天前。学习C#一直没有特别难,我几乎记得我的C ++在90年代后期,虽然天。

[UPDATE] Well I took the plunge three days ago. Learning C# hasn't been particularly hard, I could barely remember my C++ days in the late 90's though.

时的大小写讨厌我?并不像我想象......再加上我发现,它实际上是有利的。实际上,我与CCR作为异步协同编程模型真的很高兴。如果我有更多的时间在当前的项目我口代码库到C#充分利用。是不公平我的客户虽然。

Is the Case Sensitivity annoying me? not as much as i'd thought... plus I am finding that it actually is advantageous. I'm actually really happy with the CCR as a asynchronous coordination programming model. If only I had more time on the current project i'd port the code base into C# to take full advantage. Wouldn't be fair to my client though.

现在评估我目前的项目,我看到到处阻塞线程!哈啊!

Assessing my current project now and I'm seeing blocking threads EVERYWHERE! AHhhh!!!

[更新]

嗯,我一直在编程在C#中,现在将近一年。我真的很喜欢语言,我真的真的很讨厌跨越到VB(特别是当它是不可避免的!)

Well i've been programming in C# for nearly a year now. I'm really enjoying the language, and I really REALLY hate crossing over to VB (especially when it is unavoidable!)

和区分大小写的事情吗?甚至不是一个问题。

And the case sensitivity thing? not even an issue

推荐答案

C#是因为它的C形式语言这些都是区分大小写之后进行的情况下sensistive。这是从内存中这里是不是为我工作,现在我无法在 MSDN链接 。验证

C# is case sensistive because it takes after the C style languages which are all case sensitive. This is from memory here's an MSDN link which is not working for me right now I can't verify.

我也想指出,这是一个非常有效的用例:

I would also like to point out that this is a very valid use case:

public class Child
{
   private Person parent;
   public Person Parent
   {
      get { return parent;}
   }
}

是的,你可以解决这个问题用你的成员变量的前缀,但有些人不喜欢这样做。

Yes you can get around this using prefixes on your member variables but some people don't like to do that.

这篇关于为什么C#区分大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆