Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I trying to find some information about the 'Expression-bodied members' - to know if using the 'Expression-bodied members' ( beside simple properties or method ) improve some performance of the application
( maybe after compile the Expression-bodied members is call as inline method and this can improve some performance ( just an option ) )
but i can't find any explain to this.
anyone know if using the Expression-bodied members is just for better code or it also make some better performance ?
Very often it is used just to write shorter (thus writting code faster?) and more readable code.
But trying to force => whenever you can may have negative effect on readability of yours code.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I need to create an "if" statement but with a different name. Something that I could type instead of "if" but would work exact the same way.
I'm pretty sure you could do this in C and C++ by use of macros.
Such a usage could have looked something like this;
#define FagCelDev if
This is not available in C#. According to this source this was a decision made to help keep the language readable. I would suggest that they made a good decision. There is no good reason to do what you are proposing - it will just make your code less readable.
Doing things like this is a highly effective way to confuse yourself when you read your code in a year.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have read the other topics but there is apparently no way to do it,
is it possible to use C code in C# Project without using dll ?
It depends on how you are defining "use" and "C code" but the basic answer is No. You certainly can't just include a C header file or call native C functions.
You can however write code that looks like C in C# (still using pointers and such), you just need to be in unsafe mode. Note that any C standard methods would not be available and some syntactic changes would be necessary if you were pasting in C source. This is also considered bad practice; you should be writing in normal C# 99.99999% of the time.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am a new user of C# (for work), coming from C++ development. I'm used to knowing more or less how data is laid out, and how many levels of pointer indirection there are, as these things can be very important for performance.
I know I'm supposed to just relax and have a good time hammering out business software and not think about these details on the clock, but is there good documentation for this for C# somewhere?
I know there is compilation to IR, and then JIT to native code, so I guess I am asking about how C# source relates to the native x86-64 code.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Someone can explain how Collections.Concurrent library are work ?
How we get the thread-safe ?
Is their performance are good ?
You can inspect the concurrent collections implementation by yourself here (this is for ConcurrentDictionary<TKey,TValue>, other collections you can find using the left navigation pane) and get the exact picture of how they work.
The implementation depends on the collection type. It uses volatile, SpinWait, Interlocked and lock.
More information about performance is available in this paper.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am near release date for my Excel Add-In and I want to have only one limitation hardcoded in the code. My aim is for people to download and use the tool for free but have a limitation that potentially encourages them to buy the unlimited version. I know that there isn't a truly secure way to add that limitation but I was wondering what is the best way of achieving it. The limitation is simply a hardcoded value that I store in the Properties section of my app. Any ideas how I can make it a bit more secure?