下面的例子代码可以演示这个问题。
这个例子代码将在本文中通篇被用到。
You will use this sample code for exercises throughout this article.
我会使用两个代码示例。第一个例子代码结构简陋,且只有一个单独的Main方法。
I will use two code samples; first is an example of poorly structured code and has single Main method.
In fact, this example would compile because you can use curly braces in this way to encapsulate lines of code, but realize for now, that, not good.
实际上,这个例子可以编译,因为你可以用这种方式来压缩代码行,但是请认识到,那个,不太好。
So let's look at the second example, all right, I keep doing that -- this piece of code from here to here gives me a way of now creating a hash table of size 256.
所以让我们来看一下第二个例子,好的,我继续做那件事,这段代码中从这里到这里,是创建一个大小为256的哈希表。
And then on the right hand side I++, we saw that in pseudocode with our socks example last week that just says increment I.
然后是最右边的i++,我们上周在socks例子的伪代码中,曾经见到过,不是么?只是代表i加1而已。
应用推荐