Is there a reason to create a method in the constructor in c#? I have a chunck of code where methods are created like that:  class myClass{     myClass(type arg){         method1 =() =&gt; {do something with arg}         method2 =() =&gt; {do something else with arg}     }     public readonly Action method1;     public readonly Action method2; }   If I understand how c# works, there 2 references of arg that are created in method1 and method2 instead of one in the object and lambda are slower. (I have heard)  What is the interest of doing that instead of that:  class myClass{     myClass(type arg){         this.arg=arg     }     private arg;     public void method1() {do something with arg};     public void method2(){ {do something else with arg}; }
Where do I use delegates? What are some real world places that call for delegates?  I'm curious what situations or patterns are present where this method is the best solution.  No code required.
Looking for an intuitive explanation why the row rank is equal to the column rank for a matrix I recall a short lived TV show that I think was broadcast on the British TV channel ITV in the late 90s or early 2000s and it was about time travel. It was set in Britain in relatively modern times. The scene that really sticks in my head is when the protagonist goes to use their time travelling machine they go in to a room where the machine is and they close all the windows. The windows have latches on them and by closing the window it creates a circuit. By closing all the latches the circuit is complete and the machine is able to be activated. I don't know if it's much to go on, but it's been really bugging me for ages. Alignment of axis in tikz I need to have a list of all available view modes for an entity type so I can use it as the #options in a select field.  Any ideas? Thanks We've just been learning about complex numbers in class, and I don't really see why they're called numbers.  Originally, a number used to be a means of counting (natural numbers).  Then we extend these numbers to instances of owing other people money for instance (integers).  After that, we consider fractions when we need to split things like 2 pizzas between three people.  We then (skipping the algebraic numbers for the purposes of practicality), we use the real numbers to describe any length; e.g. the length of a diagonal of a unit square.  But this is when our original definition of a number fails to make sense- when we consider complex numbers, which brings me to my main question: what is a rigorous definition of 'number'?  Wikipedia claims that "A number is a mathematical object used to count, label, and measure", but this definition fails to make sense after we extend $\mathbb{R}$.     Does anyone know of any definition of number that can be generalised to complex numbers as well (and even higher order number systems like the quaternions)? Error while writing strcat() using pointers Why is this true?  $(\exists x)(P(x) \Rightarrow (\forall y) P(y))$ An example to show that convergence of Cesaro sum to $0$ does not imply the original sequence converges to $0$. I'd like construct a non-negative sequence $\{a_{k}\}_{k=0}^{\infty}$ with $a_{0}=0$ such that the Cesaro sum $\frac{1}{n}\sum_{k=0}^{n-1}a_{k}\longrightarrow 0$ but $a_{n}$ does not converge to $0$.   I have a really bad attempt:  Define $a_{0}=a_{1}=0$, and $a_{k}:=\log(\log(k))$ for $k\geq 2$, then $a_{k}\longrightarrow\infty$. But $$\dfrac{1}{n}\sum_{k=0}^{n-1}a_{k}=\dfrac{\log\Big(\prod_{k=2}^{n-1}\log(k)\Big)}{n}$$ and Wolframalpha told me that this series converges to $0$ as $n\longrightarrow\infty$.  However, I have no idea about how to show this convergence to $0$. Also, I wish to have a sequence as simple as possible, since at some stage I need too how $f(k):=a_{k}$ is positive semi-definite.   Is there any simpler example?   Thank you! Ubuntu gets stuck in a login loop My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M Difference between pts and tty Possible Duplicate:          I always see pts and tty when I use the who command but I never understand how they are different? Can somebody please explain me this? The recipe that I used did not call for cornstarch or corn syrup. The result is that they are slightly wet. Can I do anything to dry them up, such as dusting them with corn flour?  I did dredge them in a mixture of confectioners sugar and corn flour; it helped a little, but I think I will find a recipe that has corn starch in it for next time! Correct tracked camera orientation How to prove $a_1^m + a_2^m + \cdots + a_n^m \geq \frac{1}{a_1} + \frac{1}{a_2} + \cdots + \frac{1}{a_n}$ Can a negative charge ionize air? Adding to this question, I have studied that positive charge ionizes air but never studied that negative charge ionize air. If possible, please explain how does it ionize air? In Harry Potter, we know ghosts became ghosts when they are too afraid of death to go on - I thought about it and I'm quite certain they all go to their own version of Harry's King's Cross and become ghosts when they return as Harry did.  So can they return there? Once they've been a ghost long enough that they no longer fear death, can they move on? I installed Ubuntu 12.04 a month ago and am using it till now. I failed to notice that all this time there was no sound at all while running Ubuntu, even while playing a game in Wine. The weird thing is that only the startup sound comes when I log in (Indian/African drum tone), then comes the utter silence.  I tested both Digital Output (S/PDIF) and the speakers in the sound settings but can hear nothing.  Any help? How can I get TeXstudio's syntax highlighting to recognize an unknown command? TeXstudio does not recognize the LaTeX command \rm (red highlighting in the document, with the message: unrecognized command), even after I activate all possible completion files (.cwl).  In such a case, what can I do so that TeXstudio recognizes a certain command for highlighting? I recently traveled from India to USA. I am on H1B. I entered USA on 29th December 2016. As my Visa extension is due in August 2017, I was gathering documents for Visa Extension. It was required to provide a scanned copy of passport page with all entry and exit stamps.  Myself and my wife both travelled back from India. My wife's passport has a entry stamp with date as 29th December 2016. But the same is missing from my passport. I guess the officer missed putting the entry stamp on my passport. My I 94 reflects the correct date of entry as 29th December. Somehow I still have my boarding pass from this trip (usually I throw them once trip is complete).   Want to know what could be implications of missing entry stamp when I travel to India next time (somewhere towards early next year)? Does this impact my H1B Visa extension ? Also what can I do to correct this information on my passport? Sometimes when I'm making a sauce or soup that needs to be a bit spicy, I have no troubles spicing how I want to.  But if the dinner party is a bit late, or I made the sauce in advance to really draw out all the flavors of the spices, vegetables and meat, sometimes I end up with a way too spicy/hot dish.  You can always pour a bit water and try to dilute it a bit, but that also takes away all of the good flavor. So is there some trick that I'm missing I can use, when this happens to me (other than being more careful or using the spices later)? concurrentModificationException