Any decent C# profilers out there?

I need a C# profiler. Although I'm not averse to paying for one, something which is free or at least with a trial version would be ideal since it takes time to raise a purchase order. Any recommendations? You can try the following: nprof (free but kinda old) ProfileSharp (open source) .Net Memory Profiler (really good for memory leaks, there's a trial version) Edit: Nprof ha

那里有任何体面的C#分析器?

我需要一个C#分析器。 尽管我不愿意为一个付费,但免费或至少使用试用版本的东西是理想的,因为需要时间来提高采购订单。 任何建议? 您可以尝试以下方法: nprof(免费但有点旧) ProfileSharp(开源) .Net Memory Profiler(对于内存泄漏非常有用,有一个试用版) 编辑:Nprof已被替换为SlimTune并与.Net 4.0应用程序一起使用 一年半前,我在一个大型的c#项目上使用了蚂蚁探查器。 它的成本确实非常好,甚

C array arithmetic and pointers

Possible Duplicate: In C arrays why is this true? a[5] == 5[a] I am reading through a tutorial on C and I came across this syntax: int doses[] = {1, 3, 2, 1000}; doses[3] == *(doses + 3) == *(3 + doses) == 3[doses] Now the point is to get the int 1000 , but the last one doesn't make any sense. Either its late and my brain is not functioning, its something specific to C, or its a typo.

C数组算术和指针

可能重复: 在C数组中,为什么这是真的? a [5] == 5 [a] 我正在阅读关于C的教程,并且我遇到了这个语法: int doses[] = {1, 3, 2, 1000}; doses[3] == *(doses + 3) == *(3 + doses) == 3[doses] 现在的重点是获得int 1000 ,但最后一个没有任何意义。 无论是迟到还是我的大脑都不能正常工作,它是C特有的,还是它的错字。 我想在涵盖所有基本知识的时候仔细阅读指针。 这意味着理解这一切。 任何答案将不胜感激!

Questions regarding pointers

Possible Duplicate: In C arrays why is this true? a[5] == 5[a] If p is a pointer (say int * p ), then what does [p] means ? Also what does 4[p] means ? (ie multiplying a scalar with [p] ) Suppose xyz is some data type defined by in the program. Then what does the void (*xyz)(void); statement mean? 4[p] means the same as p[4] . See eg http://c-faq.com/aryptr/joke.html. If xyz is a

有关指针的问题

可能重复: 在C数组中,为什么这是真的? a [5] == 5 [a] 如果p是一个指针(比如int * p ),那么[p]意味着什么? 另外4[p]是什么意思? (即将一个标量乘以[p]) 假设xyz是程序中定义的一些数据类型。 那么这是什么 void (*xyz)(void); 声明的意思? 4[p]含义与p[4]相同。 请参阅http://c-faq.com/aryptr/joke.html。 如果xyz已经是数据类型,那么这是一个错误。 如果不是,那么它就是一个名为xyz的函数指针

Unusual output with printf statement

This question already has an answer here: With arrays, why is it the case that a[5] == 5[a]? 17 answers In your case printf("%c",3["abcde"]); can be read as printf("%c","abcde"[3]); or, as our most familiar syntax, char p [] = "abcde"; printf("%c",p[3]); It basically boils down to accessing the element in index 3 (C uses 0-based indexing for arrays) of the array. This is just a syn

使用printf语句的不寻常输出

这个问题在这里已经有了答案: 对于数组,为什么会出现[5] == 5 [a]? 17个答案 在你的情况 printf("%c",3["abcde"]); 可以读为 printf("%c","abcde"[3]); 或者,作为我们最熟悉的语法, char p [] = "abcde"; printf("%c",p[3]); 它基本归结为访问数组索引3中的元素(C使用基于0的数组索引)。 这仅仅是一个用于数组索引的语法糖。 你可以使用任何你喜欢的方式。 如果你想挖掘更多的理解,你可以看看这个问题

Where can I put an array subscript?

Possible Duplicate: In C arrays why is this true? a[5] == 5[a] This question asks why a[5] == 5[a] It is answered in all aspects except one... Why is one allowed to put an array subscript after an integer in the first place? And why isn't one allowed to write something like [a]5 or [5]a or put [] in some other odd place? In other words, what is the definition of where an array

我可以在哪里放置数组下标?

可能重复: 在C数组中,为什么这是真的? a [5] == 5 [a] 这个问题问为什么 a[5] == 5[a] 它在所有方面都有答案,只有一个... 为什么有人允许在一个整数之后放置一个数组下标? 为什么没有人允许写类似的东西? [a]5 要么 [5]a 或把[]放在其他奇怪的地方? 换句话说,数组索引操作符的定义是什么? 编辑我:我收到的答案引述标准有点难以理解。 但在现在我明白的反应者的帮助下。 在指针或整数之后允许数组

Subscripting integer variable using a pointer

Possible Duplicate: In C arrays why is this true? a[5] == 5[a] C weird array syntax in multi-dimensional arrays Today I came across this blog. What attracted me the most is this: int i; i["]<i;++i){--i;}"]; Well, I don't really know what is the purpose of the weird "string constant" inside the array subscript, but I am confused how it is possible to subscript an integer

使用指针代替整数变量

可能重复: 在C数组中,为什么这是真的? a [5] == 5 [a] 奇怪的数组语法在多维数组中 今天我遇到了这个博客。 最吸引我的是这样的: int i; i["]<i;++i){--i;}"]; 那么,我真的不知道数组下标中奇怪的“字符串常量”的目的是什么,但我很困惑如何为下标整型变量。 所以我来了这个代码: #include <stdio.h> int main(void) { int x = 10; printf("%d", x[""]); /* What is x[""]?! */ return

Why is 2[myArray] valid C syntax?

Duplicate In C arrays why is this true? a[5] == 5[a] Given an array myArray[5] = { 0, 1, 2, 3, 4 }; an element can be accessed as 2[myArray] Why? When I see this expression I'm imagining C trying to access the pointer "2" and failing to add "myArray" pointer increments to dereference that address. What am I missing? in C, a[b] is equivalent to *(a + b). And

为什么2 [myArray]有效的C语法?

重复 在C数组中,为什么这是真的? a [5] == 5 [a] 给定一个数组 myArray[5] = { 0, 1, 2, 3, 4 }; 一个元素可以被访问为 2[myArray] 为什么? 当我看到这个表达式时,我想象C尝试访问指针“2”并且未能添加“myArray”指针增量来解引用该地址。 我错过了什么? 在C中,a [b]相当于*(a + b)。 当然,+运算符是可交换的,所以a [b]与b [a]相同,*(b + a)与*(a + b)相同。

Is chars[4] and 4[chars] the same in C? Why?

This question already has an answer here: With arrays, why is it the case that a[5] == 5[a]? 17 answers In raw C, the [] notation is just a pointer math helper. Before [] , you'd look for the fourth char in the block pointed to by ptr like: *(ptr+4) Then, they introduced a shortcut which looked better: ptr[4] Which transaltes to the earlier expression. But, if you'd write it li

C中的chars [4]和4 [chars]是否相同? 为什么?

这个问题在这里已经有了答案: 对于数组,为什么会出现[5] == 5 [a]? 17个答案 在原始C语言中, []符号只是一个指针数学帮助器。 在[]之前,你需要查找ptr指向的块中的第四个字符,如: *(ptr+4) 然后,他们介绍了一个看起来更好的捷径: ptr[4] 哪一个转换为较早的表达。 但是,如果你这样写: 4[ptr] 这将转化为: *(4+ptr) 这确实是一回事。 因为[b]与*(a + b)完全相同,并且+是整数。 chars[4]是*(cha

What is 0[p] doing?

This question already has an answer here: With arrays, why is it the case that a[5] == 5[a]? 17 answers The C Standard defined the operator [] this way: Whatever a and b are a[b] is considred as *((a)+(b)) And that's why 0[p] == *(0 + p) == *(p + 0) == p[0] which is the first element of the array. 0[p] is equivalent to p[0] . Both are converted as 0[p] = *(0+p) and p[0] = *(p+0)

什么是0 [p]在做什么?

这个问题在这里已经有了答案: 对于数组,为什么会出现[5] == 5 [a]? 17个答案 C标准这样定义了operator [] : 无论a和b是a[b]被认为是*((a)+(b)) 这就是为什么0[p] == *(0 + p) == *(p + 0) == p[0]这是数组的第一个元素。 0[p]相当于p[0] 。 两者都被转换为 0[p] = *(0+p) and p[0] = *(p+0) 从上面的陈述都是平等的。 0[p] 在0[p] = 42; 相当于p[0] +操作是可交换的,我们有: p[0] == *(p + 0) == *(0

With arrays, why is it the case that a[5] == 5[a]?

As Joel points out in Stack Overflow podcast #34, in C Programming Language (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a] ? The C standard defines the [] operator as follows: a[b] == *(a + b) Therefore a[5] will evaluate to: *(a + 5) and 5[a]

对于数组,为什么会出现[5] == 5 [a]?

正如Joel在Stack Overflow podcast#34中指出的那样,在C编程语言(aka:K&R)中,提到了C: a[5] == 5[a] 乔尔说这是因为指针算术,但我仍然不明白。 为什么a[5] == 5[a] ? C标准定义[]运算符如下: a[b] == *(a + b) 因此a[5]将评估为: *(a + 5) 和5[a]将评估为: *(5 + a) a是指向数组的第一个元素的指针。 a[5]是距a更远的5个元素的值,与*(a + 5) ,并且从小学数学我们知道这些数学是相等的(加法是可交换