<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-445497911772349103</id><updated>2024-10-03T03:59:40.051-07:00</updated><title type='text'>No MVP for me</title><subtitle type='html'>I read and try to put things in the easiest possible explanation, as I do not understand complicated things.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-7808032636708128030</id><published>2011-03-07T20:06:00.000-08:00</published><updated>2011-03-07T20:06:57.612-08:00</updated><title type='text'>Starting a series on MVC</title><content type='html'>Will be starting a series on MVC from start of very basic fundamentals to advanced level of understanding.&lt;br /&gt;
&lt;br /&gt;
Keep an eye open for the articles.</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/7808032636708128030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2011/03/starting-series-on-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/7808032636708128030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/7808032636708128030'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2011/03/starting-series-on-mvc.html' title='Starting a series on MVC'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-2176993109610535131</id><published>2011-02-21T14:41:00.000-08:00</published><updated>2011-02-21T14:41:39.305-08:00</updated><title type='text'>Overcoming the Workaholic Syndrome</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 class=&quot;pageTitle&quot; style=&quot;color: #c68b4a; font-family: Arial, Helvetica; font-size: 2.4em; font-weight: bold; letter-spacing: -2px; line-height: 33px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 4px;&quot;&gt;Breaking up the Workday– Overcoming the Workaholic Syndrome&lt;/h2&gt;&lt;div class=&quot;post&quot; style=&quot;clear: both; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;postsub&quot;&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;workaholic&quot; border=&quot;0&quot; height=&quot;220&quot; src=&quot;http://maulabour.files.wordpress.com/2008/11/workaholic.jpg?w=294&amp;amp;h=300&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: inline; float: left; margin-bottom: 4px; margin-left: 0px; margin-right: 9px; margin-top: 0px; max-width: 100%; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;216&quot; /&gt;Hi, my name’s Dan Wahlin and I’m a workaholic – I admit it.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; It’s good from the standpoint that I get a lot done but it also has a lot of cons associated with it as well that I’m not proud of. I literally can’t watch TV without feeling like I should be doing something more productive (although I have no problem going to see movies at a theater or watching sporting events – that’s my escape I guess). On vacation it’s sometimes difficult the first few days to just “let go” of work and enjoy the time with my family. I always feel like I should be checking email and following up with different business projects. Fortunately, my wife knows me really well after 17 years of marriage and “gently” restricts my usage of laptops and other gadgets while we’re out. She also reminds me that constantly burying my face in gadgets just isn’t cool and shows a distinct lack of self control.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;On a given day I typically put in between 12 (at a minimum) up to 16-18 hours working on projects. My company does .NET consulting (ASP.NET/jQuery, SharePoint and Silverlight) but we also do a lot in the training space so there’s always a client project, some new courseware or some other deliverable that has to be worked on. My normal process for handling that is to just work my butt off and see how much I can get done. That process has worked well for a long time but when you start realizing that your happiness comes from how much work you accomplished that day then you have a problem. That’s especially true if you have kids (which I do….two awesome boys). It’s almost as if working more hours feels like I’m more successful or something which is of course ridiculous. It may actually mean that I’m too distracted or disorganized.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;Lately I’ve realized that while I’m still productive and always meet my deadlines, I’m really burnt out by the afternoon and have lost some of the excitement I used to have. Part of that’s normal I think given that I’ve been doing this for close to 15 years now, but in thinking through it more I realized that I just need to get away from the desk and take a break. By far, the happiest time of my life was my childhood. Part of that was due to having awesome parents, having far less responsibility (a big factor I suspect), being able to hang-out with friends at school, playing sports, games, etc. but I think a big part of the overall happiness came from being outside a lot. I lived on my bike as a little kid and as I grew up I shared time between riding an ATV all over the place, shooting hoops on the basketball court, playing golf and working on a golf course (all outside work of course).&amp;nbsp; Being a software developer and trainer I generally spend 95% or more of my day indoors and only see the sun when driving from place to place or by looking out the window (that’s sad because I live in a suburb of Phoenix, AZ where it’s nearly always sunny). I haven’t looked into any scientific studies on the matter, but I’d be willing to bet there’s a direct correlation between overall productivity/happiness and being outside some throughout the day (sunny or not). But, I wasn’t sure what to do about it since I do have a lot of deadlines I need to meet after all.&lt;img align=&quot;right&quot; height=&quot;233&quot; src=&quot;http://images.funadvice.com/photo/42/photo-fresh_cut_flowers_large.jpg&quot; style=&quot;display: inline; float: right; margin-bottom: 0.5em; margin-left: 0.5em; margin-right: 0.5em; margin-top: 0.5em; max-width: 100%;&quot; width=&quot;279&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;While talking with my wife last night I mentioned how I feel like I’m in a rut and want to get the “fun” back that I used to have. She immediately said that I need to start making time for breaks (a real quick fact – she’s a lot smarter than me and nearly always right). Of course my first thought was that I’d be less productive taking breaks. If I spend 2 hours just relaxing then I’m losing 2 hours of work. But, I thought about it more and realized that I’m probably less productive when I work 10+ hours and only take less than 30 minutes for a lunch break to relax a little. I bet my brain is screaming, “Please let me relax a little so I can figure out these problems you’re trying to resolve!”. So, starting today I’m going to try to break the workaholic habit and spend time outside of the office. That could mean sitting around outside, working out, golfing, or whatever. I’ve decided that no gadgets are allowed during that time and that I shouldn’t work for more than 4 hours straight without taking a break.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;I have no idea how my little “break the workaholic syndrome” experiment will go or how long it will last, but I’d be very interested in hearing from others on how they keep fresh and focused without working yourself to death. If you have any specific ideas, techniques or practices you follow please share them. There’s a lot more to life than work and some of us (and I’m thinking of myself specifically) need to take a long, hard look at what kind of balance we currently have. I’d hate to look back at my life when I’m 80 years old and say, “The only thing I did was work – I missed out on life!”.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px;&quot;&gt;This article is from &lt;a href=&quot;http://weblogs.asp.net/dwahlin/archive/2011/02/16/breaking-up-the-workday-overcoming-the-workaholic-syndrome.aspx&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/2176993109610535131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2011/02/overcoming-workaholic-syndrome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/2176993109610535131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/2176993109610535131'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2011/02/overcoming-workaholic-syndrome.html' title='Overcoming the Workaholic Syndrome'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-4542826854105174172</id><published>2011-02-16T15:39:00.000-08:00</published><updated>2011-02-16T21:16:51.552-08:00</updated><title type='text'>Common Development task - Firing events to send em...</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;Was asked in a forum recently...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 10px; line-height: 12px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 class=&quot;groups&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: inherit; font-size: 16px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Automatic event fire in Asp.net?&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: 13px;&quot;&gt;I want to fire an event in my asp.net application on specific time.&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;summary&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;For ex:- I want to send email to my clients on 8 Am (every day).&lt;br /&gt;
How can i do this?&lt;/div&gt;&lt;div class=&quot;summary&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, &#39;Nimbus Sans L&#39;, sans-serif; font-size: 13px; line-height: 15px;&quot;&gt;I have done this recently there are 2 options that I recently used&lt;br /&gt;
1) Have an scheduledTasks.aspx page which has the functionality of sending mail on page load based on a parameter. And then schedule task using windows task scheduler in the web server. Benefits - If the app server is not running also it will still start the app pool and send your mail.&lt;br /&gt;
&lt;br /&gt;
2) Use SQL server Database mailing facility as you can generate the html directly using a stored procedure so nothing to do in the app and then you can schedule it in the job tasks...&lt;br /&gt;
&lt;br /&gt;
Both these options will not fail even if your application is not running...where as other approaches might not work when your app pool is not running because of no calls or something else&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/4542826854105174172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2011/02/no-mvp-for-me-common-development-task.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/4542826854105174172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/4542826854105174172'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2011/02/no-mvp-for-me-common-development-task.html' title='Common Development task - Firing events to send em...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-7368258600932302332</id><published>2011-02-07T21:24:00.001-08:00</published><updated>2011-02-16T21:14:26.087-08:00</updated><title type='text'>SQL Server Fundamentals of Data Storage</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;How SQL Server stores your data&amp;nbsp;is what I am trying to explain in this post.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
First lets start from the beginning , say first lets create a new database called test and specify the initial size to be 4MB for .mdf file which is called the primary file for the db and you can have .ndf files called secondary files for data  but lets keep it to .mdf files and log file of say 1MB. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see my primary file is of 4 MB now as seen below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6I1R4C4CdZQ6xSoGrq6MFqRr8cWh_4riO1z_-pHKsYpK-p3zuscI3ebhAr0RTcIAM7l60JC9-M8hsBykMvxkeDAckI2d_lQE3jgMxDxBzC3A86wlRpui8U9bp_CJaQ49v7GW2SsWKmgM/s1600/1st.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6I1R4C4CdZQ6xSoGrq6MFqRr8cWh_4riO1z_-pHKsYpK-p3zuscI3ebhAr0RTcIAM7l60JC9-M8hsBykMvxkeDAckI2d_lQE3jgMxDxBzC3A86wlRpui8U9bp_CJaQ49v7GW2SsWKmgM/s640/1st.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we will go ahead and create a simple table called employee and see how the data for it is stored.&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE DBO.EMPLOYEE&lt;br /&gt;
(&lt;br /&gt;
EMPLOYEEID INT IDENTITY(1,1),&lt;br /&gt;
FIRSTNAME VARCHAR(50) NOT NULL,&lt;br /&gt;
LASTNAME VARCHAR(50) NOT NULL,&lt;br /&gt;
DATE_HIRED DATETIME NOT NULL,&lt;br /&gt;
IS_ACTIVE BIT NOT NULL DEFAULT 1,&lt;br /&gt;
CONSTRAINT PK_EMPLOYEE PRIMARY KEY (EMPLOYEEID),&lt;br /&gt;
CONSTRAINT UQ_EMPLOYEE_LASTNAME UNIQUE (LASTNAME, FIRSTNAME)&lt;br /&gt;
) &lt;br /&gt;
&lt;br /&gt;
So from the above it is clear that we have a primary key and a unique keys created, now lets add some data to it.&lt;br /&gt;
GO&lt;br /&gt;
INSERT INTO DBO.EMPLOYEE (FIRSTNAME,LASTNAME,DATE_HIRED)&lt;br /&gt;
SELECT &#39;George&#39;, &#39;Washington&#39;, &#39;1999-03-15&#39;&lt;br /&gt;
GO&lt;br /&gt;
INSERT INTO DBO.EMPLOYEE (FIRSTNAME,LASTNAME,DATE_HIRED)&lt;br /&gt;
SELECT &#39;Benjamin&#39;, &#39;Franklin&#39;, &#39;2001-07-05&#39;&lt;br /&gt;
GO&lt;br /&gt;
INSERT INTO DBO.EMPLOYEE (FIRSTNAME,LASTNAME,DATE_HIRED)&lt;br /&gt;
SELECT &#39;Thomas&#39;, &#39;Jefferson&#39;, &#39;2002-11-10&#39;&lt;br /&gt;
GO &lt;br /&gt;
&lt;br /&gt;
Now lets get into the details and find how the data is stored.&lt;br /&gt;
&lt;br /&gt;
DBCC IND (&#39;test&#39;,employee, -1); gives output like below&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7vdZpnzowwQhhRcFqDdKVs4NVr9TiHZdsC-amphbPZ9r2GsQiw6rcJz77tae6Mk0AiYFvVRWjfd8gf-fxK0T-tyQA9UySVYFelOCSkYqM-UYvM2ig6qHRvzMiiUi2kvPU2M1bTkmYKco/s1600/2nd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7vdZpnzowwQhhRcFqDdKVs4NVr9TiHZdsC-amphbPZ9r2GsQiw6rcJz77tae6Mk0AiYFvVRWjfd8gf-fxK0T-tyQA9UySVYFelOCSkYqM-UYvM2ig6qHRvzMiiUi2kvPU2M1bTkmYKco/s640/2nd.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Col1 -  PageFID - is 1 as we only had one mdf file and no .ndf file so all the pages are sitting on the .mdf file.&lt;br /&gt;
Col2 - PagePID - so our 4MB initial file size is divided into 512 pages (512 * 8kb = 4096 kb = 4MB), So our page numbers 153, 154,155,156 are being used for the Employee table data.&lt;br /&gt;
Co10l - PageType - 1,2,10 these are the 3 different page types shown.&lt;br /&gt;
&lt;br /&gt;
In SQL pages are either heap or B-tree, if heap then the pages just sit one after the other so to find data the database engine will have to walk through each page as they are&lt;br /&gt;
not stored as per index or any other criterion. Where as pages that are stored as B-tree are the ones which have clustered index or non-clustered index defined on them.&lt;br /&gt;
&lt;br /&gt;
Now if there was any heap page used in this table to store the data the Index ID column would have 0 which is the heap index ID, 1 for clustered and 2 for non-clustered index pages.&lt;br /&gt;
&lt;br /&gt;
Now pageType of 1 along with indexID 1 tells us that this is a data page with data stored using clustered index, whereas pageType 2 with indexId 2 tells us that the data in this page is stored &lt;br /&gt;
As a B-tree only but non-clustered index is used..for storing data, even though we did not specify any non clustered index the unique key constraint creates the non-clustered index..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And Page Type 10 are IAM page (out of scope for now but they maintain as to whether an extent belongs to the allocation unit that the IAM page is sitting on…this is useful to&lt;br /&gt;
Quickly tracking pages when needed for storing data in a allocation unit….)&lt;br /&gt;
&lt;br /&gt;
You can further check the data in any page for example you wanna see how data is stored in the page 153 the data page…&lt;br /&gt;
&lt;br /&gt;
DBCC PAGE (&#39;test&#39;, 1,153,3) WITH TABLERESULTS ;&lt;br /&gt;
&lt;br /&gt;
You need to scroll down to see the records that you entered in the table…as most of the top part of the page shows you the header which contains page no and details &lt;br /&gt;
Of the GAM,SGAM PFS and other pages in the .mdf file and other imp information like&lt;br /&gt;
&lt;br /&gt;
AllocUnitId 72057594039697408&lt;br /&gt;
PartitionId 72057594038779904&lt;br /&gt;
IndexId  1&lt;br /&gt;
ObjectId 2105058535&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheOYq9Q58vA1hTbIcgdRe-YIPOSMGrLVw3Lf75Q7UvCU1FSUj8A3L_9nwvZxJf-TiLPN6fNyokzh2DmupD75c4JGjXIyHGRSqP2B5jcLfh2QrVaiIfuSLh7YglHVE86HBfOxpKDO6Zg6o/s1600/3rd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheOYq9Q58vA1hTbIcgdRe-YIPOSMGrLVw3Lf75Q7UvCU1FSUj8A3L_9nwvZxJf-TiLPN6fNyokzh2DmupD75c4JGjXIyHGRSqP2B5jcLfh2QrVaiIfuSLh7YglHVE86HBfOxpKDO6Zg6o/s640/3rd.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope it helped I wrote this pretty quickly a bit busy with something, If u u understood something and want things in more detail let me know….i will write some more structured articles on this a bit later&lt;br /&gt;
&lt;br /&gt;
Doubts are welcome….&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Bala&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/7368258600932302332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2011/02/sql-server-fundamentals-of-data-storage_07.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/7368258600932302332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/7368258600932302332'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2011/02/sql-server-fundamentals-of-data-storage_07.html' title='SQL Server Fundamentals of Data Storage'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6I1R4C4CdZQ6xSoGrq6MFqRr8cWh_4riO1z_-pHKsYpK-p3zuscI3ebhAr0RTcIAM7l60JC9-M8hsBykMvxkeDAckI2d_lQE3jgMxDxBzC3A86wlRpui8U9bp_CJaQ49v7GW2SsWKmgM/s72-c/1st.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-8356898426735058997</id><published>2010-11-27T04:48:00.000-08:00</published><updated>2011-02-16T18:02:47.912-08:00</updated><title type='text'>CSS Selectors</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
This is a small post of all the CSS selectors, so when you see a CSS file the next time you understand what the selector in the CSS file means.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;General Selectors&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Applies to any html tag with the ID=&quot;copyright&quot;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;#copyright&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;small&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;text-align&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;center&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Applies to all &amp;lt;h1&amp;gt;&amp;lt;h1&amp;gt; HTML tags.&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;h1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Red&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;font-family&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Verdana,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Sans-Serif&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Applies to all &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt; HTML tags.&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;font-family&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Verdana,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Sans-Serif&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;text-align&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;justify&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Instead of above two selectors specifying &quot;font-family&quot; twice, use Group Selector like below.&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;h1&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;font-family&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Verdana,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Sans-Serif&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Applies to any HTML tag that has class set to &quot;latest&quot;. Ex: class=&quot;latest&quot;.&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;.latest&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;font-weight&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;bold&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Psuedo-Class Selectors &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Even though there are no such classes as a:link still we can use it, that is why it is called psuedo class selector&lt;br /&gt;
&lt;br /&gt;
a) How Anchor tags look initially instead of the usual blue.&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;span id=&quot;goog_954867212&quot;&gt;&lt;/span&gt;a:link&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Orange&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;/div&gt;b) How Anchor tags look after it was clicked once instead of the usual violet.&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a:visited&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Red&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;c) &lt;/span&gt;How Anchor tags look when they are being clicked (Mouse down on it).&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a:active&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;color&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;Gray&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Attribute Selector&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In scenarios where say you have HTML tags like this, many of them in the page then to apply CSS based on input tag will apply it to the button as well,&amp;nbsp;the solution is below.&lt;br /&gt;
&amp;lt;input type=&quot;button&quot; id=&quot;abc&quot;/&amp;gt; ------BUTTON&lt;br /&gt;
&amp;lt;input type=&quot;text&quot; id=&quot;abc&quot;/&amp;gt; ------TEXTBOX&lt;br /&gt;
&lt;br /&gt;
Applies only to the TEXTBOX not the button.&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: maroon;&quot;&gt;input[type=&quot;text&quot;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;large&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;strong&gt;Descendents Selector&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Applies to all the descendants, so in this case any &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt; elements (at any level) within any HTML tag that has the class=&quot; latest&quot;.&lt;br /&gt;
&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9pt;&quot;&gt;.latest p&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;large&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; text-decoration: underline;&quot;&gt;&lt;strong&gt;Child Selector&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Applies to the direct children and not all the descendants as the above selector does.&lt;br /&gt;
&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9pt;&quot;&gt;.latest &amp;gt; p&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;large&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; text-decoration: underline;&quot;&gt;&lt;strong&gt;Adjacent Selector&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Applies to the immediate &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt; element (at the same level in the DOM) in this case to any HTML tag with class=&quot;latest&quot;.&lt;br /&gt;
&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9pt;&quot;&gt;.latest + p&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;large&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; text-decoration: underline;&quot;&gt;&lt;strong&gt;Psuedo-Element Selectors&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
These elements do not exist but we can select them, that is why they are called Psuedo-Element selectors.&lt;br /&gt;
Makes the first line in every paragraph bold.&lt;br /&gt;
&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9pt;&quot;&gt;P:first-line&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-weight&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;bold&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
Makes the first letter in every paragraph be larger than the rest.&lt;br /&gt;
&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9pt;&quot;&gt;P:first-letter&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;font-size&lt;/span&gt;:&lt;span style=&quot;color: blue;&quot;&gt;large&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope it is helpful.&lt;br /&gt;
Cheers,&lt;br /&gt;
Bala&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/8356898426735058997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2010/11/css-selectors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/8356898426735058997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/8356898426735058997'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2010/11/css-selectors.html' title='CSS Selectors'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-6210094933809073769</id><published>2010-07-24T20:05:00.000-07:00</published><updated>2011-02-16T21:29:41.415-08:00</updated><title type='text'>WCF fundamentals .</title><content type='html'>Explains what WCF bindings, Address, Contract&amp;nbsp;are to give you a quick know how about WCF terminology&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
WCF is usefull when you want to build distributed applications, earlier to it there were many different technologies to use like Web Service (Interoperability), Remoting (Speed and only .net to .net), or there were IPC calls that could be made for calls within the same system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now if you know web-services,&amp;nbsp;I cannot expect you to know remoting or IPC calls.&lt;br /&gt;
So it was quite difficult to know different technologies, for developing a robust distributed systems architecture.&lt;br /&gt;
&lt;br /&gt;
Now what is that WCF is offering that is so attractive ? basically it gives you the flexibility to move your WCF service from local to a remote location in the intranet or &amp;nbsp;to the internet or vice versa, without even changing a single line of code. This is achieved using a programming model by which the interaction to the service from a client is always consistent whereever the service is...say local, remote or on the net. Even within the same app domain, across app domains or across processes it maintains the same model as shwon below thus giving us the flexibility to move the service anywhere.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-6z7NFdWuQu_KjRbaR_eJsD_SJRYIfffhd0lDv2gZIdWL6NLPgSgSr5XSgpD07lCTyg9KARQ3W3q4UJTwHARuG3l7A97V9XfoZCotxL957XovvbuL7cHEpYkVFZhvo2QQNjtGmIyBFHQ/s1600/WCF+Programming+Model.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; hw=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-6z7NFdWuQu_KjRbaR_eJsD_SJRYIfffhd0lDv2gZIdWL6NLPgSgSr5XSgpD07lCTyg9KARQ3W3q4UJTwHARuG3l7A97V9XfoZCotxL957XovvbuL7cHEpYkVFZhvo2QQNjtGmIyBFHQ/s640/WCF+Programming+Model.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now lets get into programming WCF, the terms and their meanings.&lt;br /&gt;
&lt;br /&gt;
1) Service - The functionality that will be exposed using the WCF service.&lt;br /&gt;
&lt;br /&gt;
2) End Point - An endpoint is defined by three parts (ABC)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A is Address&amp;nbsp;: WHERE&amp;nbsp;the service will be hosted. ex &lt;a href=&quot;http://localhost:10001/myService&quot;&gt;http://localhost:10001/myService&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;is Binding : HOW&amp;nbsp;to talk to the service, using what transport&amp;nbsp;schemas, security, and many more.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; There are 9 default bindings (wsHttpBinding, netTcpBinding etc) provided by WCF.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C is Contract : What is being offered by the Service.&lt;br /&gt;
&lt;br /&gt;
3) ServiceContract :&amp;nbsp; Technology nuetral way of exposing what the service has to offer. (Usually an interface or class).&lt;br /&gt;
&lt;br /&gt;
4) Service Host :&amp;nbsp; as the name suggests, host for the Service.&amp;nbsp;WCF service cannot stay in void needs to be hosted (using IIS, WAS, or Self Hosting). So there is a class called ServiceHost provided in the WCF namespace (System.ServiceModel) to host the service in Self Hosting, IIS and WAS will take .SVC files similar to .ASMX files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note: &lt;/strong&gt;A&amp;nbsp;Service can have multiple endpoints specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Last but not the least WCF was built completely keeping in mind the Microsoft&#39;s vision of SOA.(Not usefull as much initially when learning WCF).&lt;br /&gt;
&lt;br /&gt;
I will keep this post short, but if anyone liked it and wants to go into furthur details of WCF let me know. I will post some more information.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Bala</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/6210094933809073769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2010/07/wcf-fundamentals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6210094933809073769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6210094933809073769'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2010/07/wcf-fundamentals.html' title='WCF fundamentals .'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-6z7NFdWuQu_KjRbaR_eJsD_SJRYIfffhd0lDv2gZIdWL6NLPgSgSr5XSgpD07lCTyg9KARQ3W3q4UJTwHARuG3l7A97V9XfoZCotxL957XovvbuL7cHEpYkVFZhvo2QQNjtGmIyBFHQ/s72-c/WCF+Programming+Model.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-6883757390807109973</id><published>2010-07-01T09:26:00.000-07:00</published><updated>2011-02-16T18:03:30.544-08:00</updated><title type='text'>Fundamentals of Value Types and Reference Types</title><content type='html'>Explains the difference between,&amp;nbsp;Passing Reference and Value Types into methods, byval and byref.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
First thing first,&lt;br /&gt;
1) Value types sit on Stack.&lt;br /&gt;
2) Reference types sit on Managed heap. It is called Managed heap as it is managed by Garbage Collector.(Ref my earlier post for a better explanation on diff between value and ref type in terms of memory&lt;br /&gt;
GARBAGE COLLECTION ON VALUE AND REFERENCE TYPES).&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Assignment Operators Behavior with Value and Reference Types&lt;/u&gt;&lt;br /&gt;
When one ValueType is assigned to another value type a new copy of the value type is created on the stack.&lt;br /&gt;
ex: Structure2 = Structure1;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu5dhLTkZ_j63vWefSlP7cR2-Z3SKgzYT0-4Z8JvV9R5sQ0ErO36hvk3b-aUVkGT0sh_t7r9Vq2Cmt7jvsKd1eYKv7TQHzihlpNH1WW0dPsrc94j6cc92nBtX7KCql1ckNtjeAMnwR2sg/s1600/Example1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; rw=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu5dhLTkZ_j63vWefSlP7cR2-Z3SKgzYT0-4Z8JvV9R5sQ0ErO36hvk3b-aUVkGT0sh_t7r9Vq2Cmt7jvsKd1eYKv7TQHzihlpNH1WW0dPsrc94j6cc92nBtX7KCql1ckNtjeAMnwR2sg/s320/Example1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When one reference type is assigned to another reference type, the reference of the new variable is redirected to point to the reference of the old reference type and no new copy is created. Basically both point to the same object on the heap.&lt;br /&gt;
&lt;br /&gt;
Ex: Class 2= Class1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1PEbssyCmqG2bvy6yLlVoLZxuC5JvId8JY7WcpD4e2eqsTr3wbJG7OCPNb7luRnnJfA5Txm5N3EuWGB_KTREa5m7pLUx3tt2nAfaRLP5NiUa-peWtn0_dUJPAa2rfbGUibwIjZP5HGA/s1600/BasicHeap.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; rw=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1PEbssyCmqG2bvy6yLlVoLZxuC5JvId8JY7WcpD4e2eqsTr3wbJG7OCPNb7luRnnJfA5Txm5N3EuWGB_KTREa5m7pLUx3tt2nAfaRLP5NiUa-peWtn0_dUJPAa2rfbGUibwIjZP5HGA/s320/BasicHeap.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Passing Reference and Value Types into Methods.&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
We all know we can pass parameters into methods in two ways, passByVal and passByRef, So this is how &lt;br /&gt;
ValueTypes and ReferenceTypes behavior differs, in both ways of passing the parameters.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;Value Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reference Type&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;PassedByValue&lt;/u&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A new copy is&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No new copy is created&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; created on stack.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and only the state (data)&amp;nbsp;of the &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object can be changed&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in the called method and&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not the pointer, meaning &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; we cannot change what the &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variable points to.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;PassByRef&lt;/u&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No new copy is created&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here u can change both the &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on the stack, the same&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; state of the object as well&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; copy is used.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the variables&amp;nbsp;reference,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; meaning we can make the &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variable to point to a new&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object on the Heap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One thing i will leave you to ponder on is, what happens when say My structure which holds a variable to a class, is assigned to another structure..whether a new copy of the class is created or not, as new copy of the structure is for sure created ? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope I was clear in making things understood, any comments and input are welcome and ofcourse appreciated.</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/6883757390807109973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2010/07/fundamentals-of-value-types-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6883757390807109973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6883757390807109973'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2010/07/fundamentals-of-value-types-and.html' title='Fundamentals of Value Types and Reference Types'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu5dhLTkZ_j63vWefSlP7cR2-Z3SKgzYT0-4Z8JvV9R5sQ0ErO36hvk3b-aUVkGT0sh_t7r9Vq2Cmt7jvsKd1eYKv7TQHzihlpNH1WW0dPsrc94j6cc92nBtX7KCql1ckNtjeAMnwR2sg/s72-c/Example1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-6783632154549896861</id><published>2010-03-30T08:57:00.000-07:00</published><updated>2011-02-16T18:03:49.074-08:00</updated><title type='text'>EXPRESSION TREES WHAT ARE THEY EXPRESSING</title><content type='html'>This talks about LINQ and gives you understanding difference btw&amp;nbsp;IEnumerable&amp;lt;T&amp;gt; &amp;nbsp;and IQueryable&amp;lt;T&amp;gt; used in LINQ to SQL.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Expression Trees are datastructures, basically they (expression trees) are code sitting in memory as data. So why is that needed in the first place, to do such a thing where code needs to act as data?&lt;br /&gt;
&lt;br /&gt;
• Everyone knows what happens to your code when you compile it; it is converted to MSIL right.&lt;br /&gt;
• Now as for data, it is not compiled into MSIL instead it stays in the memory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So now I have a question for you, &lt;br /&gt;
&lt;br /&gt;
What should I do if I do not want some code to be compiled into MSIL ?&lt;br /&gt;
&lt;br /&gt;
Yep..We make the code as data (structure) in memory and it is not compiled to MSIL. Hurray...I think, I understood the need for Expression Trees.&lt;br /&gt;
&lt;br /&gt;
Now one important feature, Lambda Expressions they are just anonymous methods (right), one thing which I did not notice at the start was that when we use a lambda expression what is actually happening. &lt;br /&gt;
&lt;br /&gt;
Lambda Expression: &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;(string s,int a,int b) =&amp;gt; s.Substring(a,b)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The above example is pretty straight forward it represents a method which takes in 3 inputs and returns a string. Now we have &quot;Func&quot; keyword that represents a generic delegate in C#. So now when I write the same code above like this (it is the same):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Func&lt;string, int,=&quot;&quot; string=&quot;&quot;&gt; genericDelegateCode = (string s, int a, int b) =&amp;gt; s.Substring (a, b);&lt;/string,&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
So what I had missed before was that the lambda expressions actually generate an anonymous delegate, not an anonymous method. You know that very clearly from the above example. So I will change the above code a bit to show that lambda expression is actually an anonymous delegate.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;Func&lt;string, int,=&quot;&quot; string=&quot;&quot;&gt; genericDelegateCode = delegate (string s, int a, int b) {return s.Substring (a, b) ;} &lt;/string,&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now how do I put this, lambda expression in memory, simple by making it an expression tree (which is nothing but code as data in memory).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm7c7QJRJRm0iSUof8NJkrgABgpkbEHlDmGWaVhFa5-WxNcxZ39tYOi_ViCl2kv5fjrQ5pbb-QktRX2KabcvVfU2DR7UoL9K8HvQftRMYWfyFvLVqDOUNsEkLUG73yrwx9AeX_s9uJFrw/s1600/Untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;50&quot; nt=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm7c7QJRJRm0iSUof8NJkrgABgpkbEHlDmGWaVhFa5-WxNcxZ39tYOi_ViCl2kv5fjrQ5pbb-QktRX2KabcvVfU2DR7UoL9K8HvQftRMYWfyFvLVqDOUNsEkLUG73yrwx9AeX_s9uJFrw/s400/Untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: “&lt;strong&gt;data&lt;/strong&gt;” is highlighted above to remind you that now your Lambda expression is now in memory as an Expression Tree and will not be compiled to MSIL as it does usually.&lt;br /&gt;
&lt;br /&gt;
So your code is now in memory and can be compiled using compile() keyword on the expression keyword “data” which then generates the method in MSIL, and you can Invoke it and pass the parameters. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;String output = data.Compile().Invoke(“Balakrishna”,2,3) ;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now, all this entire article is doing is making you understand what Expression Trees are. Expression Trees is a very advanced topic, and is mostly used with LINQ flavors other than LINQ to Objects.&lt;br /&gt;
&lt;br /&gt;
My future posts will get deeper, and all this dynamic runtime generation of code will make much better sense. I will try to include the below topics in future posts &lt;br /&gt;
&lt;br /&gt;
• When to use Expression Trees, and why to use them.&lt;br /&gt;
• Explain the Expressions Trees API library, and how to manually create trees using them.&lt;br /&gt;
&lt;br /&gt;
Hope you understood the basic concept...What Expression Trees are Expressing.</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/6783632154549896861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2010/03/expression-trees-what-are-they.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6783632154549896861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/6783632154549896861'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2010/03/expression-trees-what-are-they.html' title='EXPRESSION TREES WHAT ARE THEY EXPRESSING'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm7c7QJRJRm0iSUof8NJkrgABgpkbEHlDmGWaVhFa5-WxNcxZ39tYOi_ViCl2kv5fjrQ5pbb-QktRX2KabcvVfU2DR7UoL9K8HvQftRMYWfyFvLVqDOUNsEkLUG73yrwx9AeX_s9uJFrw/s72-c/Untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-445497911772349103.post-3743457147233155689</id><published>2010-03-17T04:22:00.000-07:00</published><updated>2011-02-16T18:04:06.829-08:00</updated><title type='text'>GARBAGE COLLECTION ON VALUE AND REFERENCE TYPES.</title><content type='html'>&lt;script type=&quot;text/javascript&quot;&gt;
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);document.write(unescape(&quot;%3Cscript src=&#39;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#39; type=&#39;text/javascript&#39;%3E%3C/script%3E&quot;));
&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
try {var pageTracker = _gat._getTracker(&quot;UA-15569846-1&quot;);pageTracker._trackPageview();} catch(err) {}
&lt;/script&gt;&lt;br /&gt;
Explains how garbage collector works with Value type and Reference type,&amp;nbsp;for cleaning up the memory.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
There was one very nice article that I read felt to write this blog post so that i can have a record of what i understood. This is a very small topic and most of the people know it, but slowely tend to forget it as dust falls on the memory tape.&lt;br /&gt;
&lt;br /&gt;
First and foremost, garbage collection does not happen for value types, it is only done for reference types if you know why ? (you need not read on) : (else go ahead....cheers)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Value types have their own value where as reference types have reference to the value and not the actual value directly. So now is this the reason why garbage collection is not done for value type?&lt;br /&gt;
&lt;br /&gt;
No the reason why GC is not done for value types lies in the memory that they are allocated on.&lt;br /&gt;
Value types are allocated on the stack, so they are created when a method is invoked and when the method execution is completed the memory taken up by the variables on the stack is freed, so there is no need for GC on value types.&lt;br /&gt;
&lt;br /&gt;
Now why is GC needed for reference types..&lt;br /&gt;
&lt;br /&gt;
When you create an instance of the reference type they are allocated on the stack like Value types are, but they point to a value for getting their actual value which is sitting on the Managed heap (&lt;a href=&quot;http://ptgmedia.pearsoncmg.com/images/art_chappell5_month5/elementLinks/chappell5fig02.gif&quot;&gt;fig&lt;/a&gt;). You know from reading above that the stack variables are removed after the method execution is completed, but the actual value sitting on the managed heap which was referenced by the reference type variable instance is still sitting on the Managed Heap. Now this is how GC checks the managed heap objects whether there are any references left on the Stack that use this value on the Managed Heap if there is nothing it is freed.&lt;br /&gt;
&lt;br /&gt;
Basically Garbage Collection is a two step process 1) it finalizes object that are no more referenced and in the next GC cycle the memory is freed.&lt;br /&gt;
&lt;br /&gt;
Hope you understood and felt as good as i felt after reading the article...Knowing something well makes us happy and confident.&lt;br /&gt;
&lt;br /&gt;
And this Video if you have time explains things in great detail , I understood GC very well after seeing this video.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dzdMMS5culTSCjCmMNc7POE9KUjbYXIbt512gM8pq1bC-nGevw9neWkCriVMW6XJWUn2DlcogVpdNbvowxUSQ&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Bye...Keep rocking</content><link rel='replies' type='application/atom+xml' href='http://notmvp.blogspot.com/feeds/3743457147233155689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://notmvp.blogspot.com/2010/03/garbage-collection-on-value-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/3743457147233155689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/445497911772349103/posts/default/3743457147233155689'/><link rel='alternate' type='text/html' href='http://notmvp.blogspot.com/2010/03/garbage-collection-on-value-and.html' title='GARBAGE COLLECTION ON VALUE AND REFERENCE TYPES.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01047171110911778541</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>