What is the difference between following two implementaion,if no difference why we need Extension methods ? (public static List&lt;TSource&gt; ToList&lt;TSource&gt;(this IEnumerable&lt;TSource&gt; source);)  1.IEnumerable&lt;Student&gt; myExtension = mtyStudent; // "mtyStudent is colletion"     myExtension.ToList();  2.List&lt;Student&gt; myStudent= Enumerable.ToList(myExtension);
A "non-believer" of C# was asking me what the purpose to extension methods was. I explained that you could then add new methods to objects that were already defined, especially when you don't own/control the source to the original object.  He brought up "Why not just add a method to your own class?" We've been going round and round (in a good way). My general response is that it is another tool in the toolbelt, and his response is it is a useless waste of a tool... but I thought I'd get a more "enlightened" answer.  What are some scenarios that you've used extension methods that you couldn't have (or shouldn't have) used a method added on to your own class?
Why do we need to fork to create new processes? How do I show that $X = \left\{ (x,y) \in \mathbb{R}^2 \mid x \in \mathbb{Q}\text{ or }y \in \mathbb{Q}\right\}$ is path connected?    Note that $X$ is a topological space with subspace topology $\tau = \left\{ U \cap X \mid U\text{ is open in }\mathbb{R}^2\right\}$.  I only know two things (with respect to path connectedness):   A topological space $X$ is path connected iff for every $p,q \in X$, there is a continuous function $f: [a,b] \to X$ with $f(a)=p$ and $f(b) = q$.    Continuity $f$ is defined as for every open set in $X$, its preimage is open in $[a,b]$ (with subspace topology induced by $\mathbb{R}$ (with standard topology) )   Suppose $X$ and $Y$ are two topological spaces and $f: X \to Y$ is a continuous surjection. If $X$ is path connected, then $Y$ is path connected. How can I remove duplicate rows? What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null How to delete file(s) in secure manner? I`m using the Newton-Raphson method for obtaining MLE for parameters for maximizing my objective function. At each iteration, I want to check that is the Hessian matrix negative definite or not and I see the Hessian matrix is not negative definite at some iterations. So, I want to use the Fisher scoring algorithm ( of derivation) In this situation, the Fisher information matrix is indefinite!! Is it possible? What are the reasons for this? Are the second-order derivatives wrong? Or are values of expectations incorrect? Probability of $p(x_1<x_2<\max(x_3,x_4))$ I recall having heard somewhere that the only 1-manifolds (second countable, Hausdorff, connected spaces locally homeomorphic to $\mathbb R$) are $\mathbb R$ and $S^1$. Is this true? If so, is there a reasonably elementary proof? Cat 5/6 in same conduit as power: is NM-B required, or is THHN acceptable? I'm in a numerical analysis course right now and it's pretty rigorous but I'm enjoying it a lot. I took a lower level course before that was more oriented towards implementation of numerical methods, so it's not my first time with the material.  Anyway, my professor wrote his own course notes and they're fantastic but I wanted some reference material since I'm currently outlining my own notes. Just wondering what the big ones out there are  edit: I would say I'm at an advanced undergraduate level iPhone's Bluetooth - What? Why? How? I googled a lot and read many documents. But I can't understand the concept behind iPhone's Bluetooth technology.  In my knowledge, Bluetooth was used for:   Transferring files between devices Wireless communication for things like video gaming and earphones   Recently I tried to copy some of the photos from my old Android mobile to my iPhone 4S via Bluetooth. It's quite simple in my older phones to connect with other devices by Bluetooth for file sharing. But I can't pair other devices (even another iPhone :( ) with my iPhone 4S.   Copying songs/videos may affect their iTunes as well as their business. But what about images? Why is the usage of Bluetooth restricted and what's the use of it being able to transfer images? Is there any other way to use iPhone's Bluetooth to transfer files? Maybe using an app? But I don't want to jailbreak my device.   I'm confused about the restrictions and Apple's thinking. In calculating work done by a constant force over a constant distance, why doesn't the subject's initial velocity matter? Assume a point-mass $m$ is travelling in a straight line, and a force $F$ will act on $m$ (in the same direction as $m$'s velocity) over a constant distance $d$; why doesn't $m$'s velocity matter to the calculation of work done on $m$ by $F$? Work is defined such that, in this example, the work done by $F$ on $m$ is equal to $Fd$, but it seems that if $m$ were moving slower, it would spend more time in the field, allowing $F$ more time to act on $m$, thereby doing more work. In fact, if $m$'s velocity were very great, it would hardly spend time in $F$'s field at all (so very little work done). Maybe I misunderstand work; can someone address this confusion of mine? How do I make my document use the Times font, both for the text and the math? I know that I can put \usepackage{times} in the preamble in order to use the Times font instead of Computer Modern for my document.  But this only affects the text; the math is still typeset using Computer Modern.  How can I make Latex use Times also for the math? Ideal of the twisted cubic The twisted cubic is the image of the morphism $\phi : \mathbb{P}^1 \to \mathbb{P}^3 , (x:y) \mapsto (x^3:x^2 y:x y^2:y^3)$, it is given by $X = V(ad-bc,b^2-ac,c^2-bd)$. Now I would like to compute $I(X)$, which equals by the Nullstellensatz the radical of the ideal $I := (ad-bc,b^2-ac,c^2-bd) \subseteq k[a,b,c,d]$. I think that that $I$ is already a radical ideal, even a prime ideal. Namely, I suspect that  $$\phi^* : Q:=k[a,b,c,d]/I \to k[s,t] , a \mapsto s^3, b \mapsto s^2 t , c \mapsto s t^2 , d \mapsto t^3$$ is an injection. If this is true: How can we prove that? I've already tried to find a $k$-basis of the quotient, but this turned out to be a big mess. Even the representation of the quotient as a monoid algebra doesn't seem to help. Another idea is the following: A formal manipulation of generators and relations implies $Q_a \cong k[a,b]_a$. Thus it suffices to prove that $Q \to Q_a$ is injective, i.e. that $a$ is not a zero divisor. Suppose k is an integer such that $6k + 1$, $12k + 1$, $18k + 1$ are primes. Show that $n = (6k + 1)(12k + 1)(18k + 1)$ is a Carmichael number.  This is a question on a past exam that I find difficulty to answer. Can anyone help? How to pick a specific symbol from a specific font? Is there any way, shape, or form that ultraviolet light is recorded by a digital sensor?  Ideally, this question is related strictly to the sensor, without even a glass lens in between which could cut or block UV light.  But of course I don't take pictures with a bare sensor, I also have a lens, so I'd also like to know how much UV gets to the sensor to begin with. Sending & Receiving SMS via WiFi Is there a way to send and receive SMS when a cellular signal is not available, but WiFi is?  I'm often on-site at locations where the building has a strong WiFi (Internet) connection, but a simple cell signal is spotty at best. how do I prove that $1 > 0$ in an ordered field? I've started studying calculus.  As part of studies I've encountered a question. How does one prove that $1 &gt; 0$?  I tried proving it by contradiction by saying that $1 &lt; 0$, but I can't seem to contradict this hypothesis.  Any help will be welcomed. Can I run Android apps on Ubuntu? Is it possible to run Android apps on Ubuntu? And I don't mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center. Is it correct to say user accounts or users account when referring to the accounts any user has on a site like this one?  In general, in the case of a noun that is used as adjective for the noun that follows, is it better to use &lt;plural-noun&gt; &lt;singular-noun&gt; or &lt;singular-noun&gt; &lt;plural-noun&gt;?