Blog - Title

Visual Studio 2013 Current Status

  • The Ultimate Visual Studio Tips and Tricks Blog

    Vista SP1


    I get a lot of question as to when Vista Service Pack 1 will be out.  Here is the answer I received today:


    March 18, 2008

    SP1 available on Windows Update, Download Center, MSDN & TechNet


    April 18, 2008

    SP1 pushed via automatic download



    Also, many of you know I am a no bullshit kinda guy so I believe there are things that need to be fixed with Vista and, thankfully, SP1 seems to address most of these issues.  That notwithstanding I KNOW that Vista is certainly the most secure OS I have ever used and hella lot easier to use than older versions of Windows. Just my .02.

  • The Ultimate Visual Studio Tips and Tricks Blog

    Print with Line Numbers


    Keyboard:  CTRL + P
    Menu:  File -> Print
    Command:  File.Print
    Versions:  2008,2010
    Published:  3/9/2010
    Code:  vstipEnv0006


    Want to print your line numbers with your code?  Don't worry!  You can do it by just checking the "Include line numbers" option in the Print Dialog:


  • The Ultimate Visual Studio Tips and Tricks Blog

    TODO Comments in the Task List


    Versions:  2008,2010
    Published:  6/7/2010
    Code:  vstipTool0029


    Ever been writing some code and you want to leave a reminder to yourself to do something on a particular line or area?  Did you know about the "to do" comment feature?  It seriously rocks if you have never used it AND, because it goes in the source code, everyone can have access to the information when you do you check-in!


    So here's how it works:  In VB you just put any comment in that begins with the letters "todo" (case doesn't matter):



    In C#, it's pretty much the same thing (again, case doesn't matter):



    C++ requires that the “TODO” be in upper-case or it will not show up in the Task List:




    In C++ for VS2010 you have to explicitly turn this feature on.  Go to Tools | Options | Text Editor | C/C++ | Formatting | Miscellaneous and change Enumerate Comment Tasks to true:




    Regardless which language you use the result is a nice entry in your Task List:



    NOTE:  In order to see these items, you have to click the drop-down list in the Task List and choose Comments as shown here.

  • The Ultimate Visual Studio Tips and Tricks Blog

    Turn on Line Numbers


    Menu:  Tools -> Options -> Text Editor -> All Languages -> General -> Display
    Versions:  2008,2010
    Published:  3/7/2010
    Code:  vstipEdit0025


    Line numbers are not on by default.  To turn on line numbers just go to Tools -> Options -> Text Editor -> All Languages -> General -> Display and check Line numbers:


  • The Ultimate Visual Studio Tips and Tricks Blog

    Calling a PowerShell Script From Your .NET Code



    Well, Mike F. reminded me to write this article on 5/29 and I am FINALLY getting around to doing it.  Also wanted to give a shout out to Max T. who provided some inspiration on this one as well.  For the code, I borrow very heavily from the article written by Jean-Paul Mikkers found at:


    NOTE:  There is an async version of his code that he does as a follow up.  I don't use it because I want to remove extra code noise to focus on the act of calling the script itself.  If you want to take a stab at the async version (and there are LOTS of good reasons to do so) then you can go here: 


    So, on to the goodness!


    First, you need to make sure you have Visual Studio (any version) installed and have PowerShell installed.  You can get PowerShell from here:






    1.   Now, let's crank out a simple PoweShell script that we are interested in calling.  We will call a simple script that takes a couple of numbers and returns the sum of those numbers.  This may seem overly simplistic but it is an easy way to demonstrate a complete round-trip between our app and the script without getting bogged down in extra BS that comes with a fancier script.  I'll call the script AddItUp.ps1 and it is included in the source code download, just put it anywhere you can get to easily.  Feel free to dig into the guts of it later on but for now just assume it does what we need it to do. 


    Here is the code for the script if you just want to make your own real quick:


    # begin

    function AddStuff($x,$y)
       $x + $y


    AddStuff 6 5

    # end


    NOTE:  Some inspiration and just a cool site for scripts came from just as an fyi




    2.  Test the script by opening PowerShell and navigating to the directory where it is and typing what you see in the graphic, you should get the expected result.






    3.  Okay!  We have a script that works but now what?  Well we have to call that puppy from our code so let's create a project and get ready to make our magic happen.  Crank out a new Windows App for us to use.  Call the Project CallMeCS or CallMeVB depending on your language.








    4.  For the interface, just gimme a button and a label.  Resize the form a bit so we don't have wasted space.  Real simple stuff...






    5.  Double-click on the button to go into our code.










    6.  Now we need to add an assembly that is one of a set we got with our install of PowerShell.  You can find these assemblies at C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0




    7.  Right-click on your project and choose Add Reference...





    8.  Select the Browse Tab and locate these assemblies then add a reference to the System.Management.Automation.dll

    NOTE:  If you want to dig deeper into the contents of this namespace, you can check it out here:





    9.  Now that we have our reference we need to add some using/imports statements to make getting to the classes we want to use easier.  Make sure to put these at the top of your code page outside any other code. 



    using System.Collections.ObjectModel;
    using System.Management.Automation;
    using System.Management.Automation.Runspaces;
    using System.IO;



    Imports System.Collections.ObjectModel
    Imports System.Management.Automation
    Imports System.Management.Automation.Runspaces
    Imports System.Text
    Imports System.IO



    10.  Okay, this next part is a little funkier.  While I liked the code that Mikkers had, I wanted to be able to load up a file from my file system and use it instead of just putting code into a textbox.  That created some VERY interesting new challenges but the end result worked out well.  So, to that end, we will create two helper methods:  RunScript and LoadScript.  RunScript is the code essentially unchanged from Mikkers' article and LoadScript is my helper function that will load the contents of a script file and return a string.



    11.  Let's begin with the RunScript method.  We will add this method to the Form1 class to make our life easier. 



    private string RunScript(string scriptText)
           // create Powershell runspace
           Runspace runspace = RunspaceFactory.CreateRunspace();

           // open it

           // create a pipeline and feed it the script text
           Pipeline pipeline = runspace.CreatePipeline();

           // add an extra command to transform the script output objects into nicely formatted strings
           // remove this line to get the actual objects that the script returns. For example, the script
           // "Get-Process" returns a collection of System.Diagnostics.Process instances.

           // execute the script
           Collection<PSObject> results = pipeline.Invoke();

           // close the runspace

           // convert the script result into a single string
           StringBuilder stringBuilder = new StringBuilder();
           foreach (PSObject obj in results)

           // return the results of the script that has
           // now been converted to text
           return stringBuilder.ToString();



    ' Takes script text as input and runs it, then converts
        ' the results to a string to return to the user
        Private Function RunScript(ByVal scriptText As String) As String

            ' create Powershell runspace
            Dim MyRunSpace As Runspace = RunspaceFactory.CreateRunspace()

            ' open it

            ' create a pipeline and feed it the script text
            Dim MyPipeline As Pipeline = MyRunSpace.CreatePipeline()


            ' add an extra command to transform the script output objects into nicely formatted strings
            ' remove this line to get the actual objects that the script returns. For example, the script
            ' "Get-Process" returns a collection of System.Diagnostics.Process instances.

            ' execute the script
            Dim results As Collection(Of PSObject) = MyPipeline.Invoke()

            ' close the runspace

            ' convert the script result into a single string
            Dim MyStringBuilder As New StringBuilder()

            For Each obj As PSObject In results

            ' return the results of the script that has
            ' now been converted to text
            Return MyStringBuilder.ToString()

        End Function



    12.  Now we want to add in our LoadScript method to make getting the script into a variable easier.



    // helper method that takes your script path, loads up the script
            // into a variable, and passes the variable to the RunScript method
            // that will then execute the contents
            private string LoadScript(string filename)
                    // Create an instance of StreamReader to read from our file.
                    // The using statement also closes the StreamReader.
                    using (StreamReader sr = new StreamReader(filename))

                        // use a string builder to get all our lines from the file
                        StringBuilder fileContents = new StringBuilder();

                        // string to hold the current line
                        string curLine;

                        // loop through our file and read each line into our
                        // stringbuilder as we go along
                        while ((curLine = sr.ReadLine()) != null)
                            // read each line and MAKE SURE YOU ADD BACK THE
                            // LINEFEED THAT IT THE ReadLine() METHOD STRIPS OFF
                            fileContents.Append(curLine + "\n");

                        // call RunScript and pass in our file contents
                        // converted to a string
                        return fileContents.ToString();
                catch (Exception e)
                    // Let the user know what went wrong.
                    string errorText = "The file could not be read:";
                    errorText += e.Message + "\n";
                    return errorText;




    ' helper method that takes your script path, loads up the script
        ' into a variable, and passes the variable to the RunScript method
        ' that will then execute the contents
        Private Function LoadScript(ByVal filename As String) As String


                ' Create an instance of StreamReader to read from our file.
                ' The using statement also closes the StreamReader.
                Dim sr As New StreamReader(filename)

                ' use a string builder to get all our lines from the file
                Dim fileContents As New StringBuilder()

                ' string to hold the current line
                Dim curLine As String = ""

                ' loop through our file and read each line into our
                ' stringbuilder as we go along
                    ' read each line and MAKE SURE YOU ADD BACK THE
                    ' LINEFEED THAT IT THE ReadLine() METHOD STRIPS OFF
                    curLine = sr.ReadLine()
                    fileContents.Append(curLine + vbCrLf)
                Loop Until curLine Is Nothing

                ' close our reader now that we are done

                ' call RunScript and pass in our file contents
                ' converted to a string
                Return fileContents.ToString()

            Catch e As Exception
                ' Let the user know what went wrong.
                Dim errorText As String = "The file could not be read:"
                errorText += e.Message + "\n"
                Return errorText
            End Try

        End Function


    13.  Finally, we just need to add some code for our button's click event.



    private void button1_Click(object sender, EventArgs e)
                // run our script and put the result into our textbox
                // NOTE: make sure to change the path to the correct location of your script
                textBox1.Text = RunScript(LoadScript(@"c:\users\zainnab\AddItUp.ps1"));



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            'run our script and put the result into our textbox
            'NOTE: make sure to change the path to the correct location of your script
            TextBox1.Text = RunScript(LoadScript("c:\users\zainnab\AddItUp.ps1"))
    End Sub


    14.  That's it!!  You should be able to run your code and you should get this:




    Don't sweat it if you think this is a lot to type.  I have included the source code for you to use.  Enjoy!

  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 11 Developer Preview - Project Backward Compatibility (Round-Tripping)



    [ NOTE:  This post has been depricated.  The new, updated post can be found here: ]




    UPDATE 3/8/2012:  As of the Beta this does not work with all project types.  Most notably web projects are not supported currently for this feature.  For more information on what is supported and what isn't look here:


    Probably one of the most welcome new features in VS11DP is the new project backward compatibility feature also known as project round tripping.  Let’s dig into the details.


    The Old Days

    In all prior incarnations of Visual Studio if you had an older version, VS2008 for example, and opened up the project in a newer version, VS2010 in this case, you had the option to convert the project.  If you did the conversion it was a one-way trip.  You couldn’t open the project again in VS2008 if you tried to go back.  This has been the source of a lot of pain and suffering for developers who have to work with multiple versions of Visual Studio.  We want the cool features of the latest IDE but still want others on our team to be able to open the solution in the older version of Visual Studio when they get the files from source control.


    The New, Happy Days

    You can now create projects in Visual Studio 2010 with Service Pack 1 then open those projects in Visual Studio 11 Developer Preview and THEN open the project up again in VS2010SP1.  In other words, we now have full project round-tripping capability so you can work with the latest features but still keep the solution compatible with and older version of Visual Studio. 


    Putting it to the Test

    Here are the steps you can take to test this for yourself:

    1. Create a project with Visual Studio 2010 with Service Pack 1 and put in a little sample code.
    2. Save and close the solution.
    3. Open the solution (CTRL + SHIFT + O) in Visual Studio 11 Developer Preview and add some more code.  Notice there is no longer a prompt to convert the project that appears.
    4. Save the close the solution.
    5. Open the project up again in VS2010SP1 and bask in the glory of project round-tripping.


    Limitations / Observations

    • I know this works with Visual Studio 2010 Service Pack 1 but haven’t tested VS2010 with out the service pack.  I believe it will not work unless you have the service pack but am checking with the team.
    • You can’t use this feature with versions older than VS2010.
    • When you use any feature specific to the new version of Visual Studio, like changing the Framework to the latest version, then the project cannot be opened in the prior version.  I just changed the framework version from 4.0 to 4.5 for a project and saved it without many any other change and was not able to open the solution in VS2010.
  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 2012 New Features: Preview Tab



    Preview Tab Overview

    We all explore code and need to move quickly between files when examining code to get familiar with it or debugging or [insert file browsing scenario here]. In prior versions of Visual Studio you had to open a file to look at the contents which often resulted in many open files (tabs) when you were done. The Preview Tab eliminates the need to open files when browsing code. Most likely you’ll first encounter the Preview Tab when you are looking at files with Solution Explorer. When you click on a supported file type, you will see the contents of that file in the new preview tab (to the far right in the tab well):



    If you click anywhere inside the file the tab will go from grey to purple to distinguish it from regular (blue) tabs:



    Again, the point of the preview tab is to let you view the contents of a file without actually opening up a new tab in the tab well. As you look at different files the preview tab only shows the contents of the file you are currently on. This keeps the environment from getting cluttered with open tabs and allows you to focus on only those files that are interesting to you. Solution Explorer isn’t the only place you can use the preview feature. It turns up in several situations where you might need to look at file content. For example, when using Find in Files (CTRL + SHIFT + F) to locate information you will see the preview tab:




    Promoting Previews

    At some point you may decide to promote the preview to an opened tab in the Tab Well so you can do additional work on the file or just keep it around for other purposes. There are a few ways you can make this happen.


    Click the Keep Open button

    Probably the least useful and and least likely technique you will use is to click on the tiny Keep Open button on the Preview Tab.  It’s not only useless it’s actually kind of annoying for some reason I can’t identify:



    Double Click the File

    The most likely approach is you will just double click the file in Solution Explorer or whatever results dialog you happen to be in.


    Press CTRL + ALT + HOME

    With the cursor inside the file (the tab is purple), just press CTRL + ALT + HOME to open a tab for the file you are currently viewing.


    Change the File

    While previewing a file, if you make any change to the file it will automatically be promoted to an open tab so that you can make additional changes and do any other actions you need to perform.


    Click the Preview Selected Items button

    Another button is useless and a waste of space on the Solution Explorer toolbar is the Preview Selected Items button.  You can click it to preview the current file and its only use that I can find is if you turn off single clicking a file to preview it (see below).  Also the tooltip would lead you to believe that you can select multiple files and preview them.  Nope.  Doesn’t work.  Don’t waste your time with this button.




    Turning Preview Off

    To see the options you have for using the preview feature, just type preview in Quick Launch (CTRL + Q) and click Environment -> Tabs and Windows:



    This will take you to Tools | Options | Environment | Tabs and Windows:




    To turn off the preview feature (NOT suggested unless you are having performance issues with it) uncheck the Allow New Files to be Opened in the Preview Tab option. Also notice you can decide if a single click open the files in for preview in Solution Explorer and Find dialogs. For Solution Explorer you can use ALT to prevent a file from being previewed when you click on it. While I see the value in using ALT to prevent preview from happening. I haven’t yet found any reason for turning off the single-click option as it, in effect, forces you to use the Preview Selected Items button which is a lot of extra work and kind of defeats the purpose of the feature.




    The Preview Tab is one of my top two favorite features in Visual Studio 2012 (the other one being project round-tripping).  You definitely want to leverage this feature to make your life easier.

  • The Ultimate Visual Studio Tips and Tricks Blog

    Visual Studio 2013 Preview: Enhanced Scroll Bar


    Visual Studio 2013 has another great new feature: enhanced scroll bar functionality. The new scroll bar will show cursor location, breakpoints, and much more! Let’s take a look.

    5-17-2012 12-51-16 PM



    Power Tools

    Before we begin I want to address where some of the new features in VS2013 are coming from. In Visual Studio 2013 many of the new features we put into the product were actually introduced via the Productivity Power Tools for Visual Studio 2012. This is an ongoing trend and you will see that many of the new features from future versions will come directly from the Power Tools. If you are still on 2012 you can get a lot of the newest functionality by installing the Visual Studio 2012 Power Tools which can be found here:



    Scroll Bar Options

    To really get a handle on the new scroll bar functionality the first thing you should do is Right Click on the vertical scroll bar and choose Scroll Bar Options:

    5-17-2012 11-57-37 AM


    You will see several settings that can be modified:

    5-17-2012 12-00-10 PM

    (NOTE: You can also get to this area by going to Tools | Options | Text Editor | All Languages | Scroll Bars)



    Show Scroll Bar

    5-17-2012 12-08-43 PM

    The first two options are pretty self-explanatory they will allow you to show or hide the scroll bars. For the most part you will leave these checked unless you have some special reason not to have them visible. 



    5-17-2012 12-12-18 PM

    The Display area allows you to turn on annotations that will show special items throughout the entire document within the scroll bar. This allows you, at a glance, to see where things like breakpoints and bookmarks are. We will look at these in the order you are most likely to encounter them but here is an example of the vertical scroll bar with annotations in it:

    5-17-2012 12-32-50 PM



    Show Caret Position

    5-17-2012 12-17-37 PM

    The first annotation you will most likely encounter is the caret position indicator. It simply shows the current position of the cursor with a blue line in the scroll bar.



    Show Changes

    5-17-2012 12-28-50 PM

    If you missed my blog post a couple of years ago on tracking changes in the editor, this is a good time to read it. You can find the post here:


    The Show Changes option simply shows the changes within it so you can see modifications at a glance for the entire document.



    Show Marks

    This options is fairly broad and covers several types of marks that can appear in code. Most notably this will show breakpoints:

    5-17-2012 12-42-29 PM


    Additionally, this will also show things like Bookmarks:

    5-17-2012 12-44-01 PM



    Show Errors

    The final indicator is arguably one of the most important. It shows any syntax errors the editor is aware of:

    5-17-2012 12-46-58 PM


    This let’s you quickly see where there are errors that need to be fixed before you compile your code.




    There are two behavior options for the vertical scroll bar: bar mode and map mode. So far everything we have seen is the traditional bar mode for the scroll bar. Now we will switch to map mode:

    5-17-2012 12-55-12 PM


    Map mode essentially turns your vertical scroll bar from this:

    5-17-2012 12-56-48 PM


    To this:

    5-17-2012 12-57-38 PM



    Source Overview

    Map mode is miniature look at your document so you can quickly get a feel for your code. There are four options for source overview when using map mode. I’ll show examples of the four views below. Of these the Off setting will be the most confusing until you see the Preview Tooltip in action so be patient.



    5-17-2012 12-57-38 PM



    5-17-2012 12-59-53 PM



    5-17-2012 1-00-50 PM



    5-17-2012 1-02-23 PM



    Preview Tooltip

    Regardless of which map mode view you use there is also an option to have the Preview Tooltip. Simply put your mouse pointer over any part of the vertical scroll bar and you will get a preview of the code at that position in the document:

    5-17-2012 1-09-33 PM



    All annotations previously mentioned also show up in map mode:

    5-17-2012 1-12-45 PM



    Go to a Specific Location on the Scroll Bar

    You basically have two options when you want to go to a specific location on the scroll bar. Let’s examine both ways.


    Left Click

    As long as you are in map mode:

    5-17-2012 2-39-51 AM


    You can simply LEFT CLICK any area on the scroll bar and you will jump to that location:

    5-17-2012 2-41-10 AM


    For this reason, I suggest, even if you don’t want the map, that you at least use map mode set to Off to get this functionality so you can quickly move around using the scroll bar:

    5-17-2012 2-44-42 AM



    Scroll Here

    Now that you have a solid base level of knowledge for this feature there is one more important item I want to show you: Scroll Here. If you find any place that is interesting to you in the vertical scroll bar and want to quickly go to that location you can simply Right Click the location and choose Scroll Here:

    5-17-2012 10-12-17 PM


    The new location will come into view so you can begin looking at the code:

    5-17-2012 10-13-50 PM




    The enhanced vertical scroll bar is a great tool for developers to quickly see places of interest and to examine those locations. Try this feature out and see if you like it as much as I do. :)

  • The Ultimate Visual Studio Tips and Tricks Blog

    Ever Give Your Dog Mouth-To-Mouth?



    Well!  I had an interesting night.  As many of probably know by now we have four dogs at my house:  Max (Basenji), Fibi (Jack Russell Terrier), Lily aka Piggy (we think she is a Pit Bull mix), and Zorro (Blue Tick mix).  With four dogs you are always breaking up little fights between them at one time or another.  Not sure if it is just our dogs or this is a normal thing. 


    Last night my dogs were in the backyard and I heard a little skirmish start.  I did my usual yell to tell them to cut it out but this time Zorro kept making a funny noise like he was hurt.  It didn't sound good at all.  I went out side and found Max and Zorro attacking Lilly.  Normally Lilly can handle herself no problem but she didn't seem to be fighting and it looked like Zorro had her around the neck. 


    As I approached and got Zorro to hold still I discovered that he had managed to get his lower jaw stuck in Lilly's collar.  As I looked closer I found I was having a hard time getting Zorro lose so I brought them closer into the light near our porch.  That is when I realized there was a bad problem.  Zorro was really stuck and there was blood all over Lilly. 


    I called for my wife to come down and give me some help and she began looking for a flashlight to get a better idea of what we were dealing with.  Right after she left, I noticed that Lilly had a funny look and realized she was choking--things were much worse than I thought.  OMG.  I almost freaked but held it together and called for my wife to bring me a knife (screw the collar, ill buy a new one).  It was close but I managed to cut the collar off w/o cutting Zorro or Lilly.  As soon as I cut them lose, I grabbed Lilly who had turned purple and had stopped breathing.


    I didn't know you could give a dog mouth-to-mouth but my wife (freaking out) managed to say "give her mouth-to-mouth".  Now, I have to admit, giving my dog mouth-to-mouth was not appealing to me but when you are faced with a purple dog you tend to not give a crap.  I directed her to start the car so we could take Lilly to the emergency room and gave the the dog mouth-to-mouth. 


    It worked!  I never, EVER would have thought you could resuscitate a dog that way but she started breathing slowly and we rushed her  to the emergency room.  By the time we got to the emergency room, she had completely restored breathing and was just a regular dog.  So there we were in our pajamas with a perfectly healthy dog just wagging it's tail and having a good time.  About 30 minutes and 95 dollars later we were on our way home and now we are looking for a new (hopefully safer) collar for Lilly. :P

  • The Ultimate Visual Studio Tips and Tricks Blog

    LINQ and Stored Procedures


    Okay so last quarter I was asked if you can call stored procedures using Language Integrated Query (LINQ).  The answer, of course, is YES!  It would be kind of silly if we didn't include this type of functionality. :P


    NOTE:  You need the following items to do this example

    SQL Server (pretty much any version will do but this example uses 2005)

    Visual Studio 2008 (Beta 2 was used for this example)

    A little time to sling some code



    So how exactly DO you call a stored proc using LINQ?  Easy just follow these simple steps:

    1. Create a new Windows Forms Application in Visual Studio 2008, let's call it "LINQ_SP_Coolness"

    2. Next, make sure you have a connection to some data source in your Server Explorer.  You may need to add a new connection.

    3. For the purposes of this discussion I am using the Northwind Database on SQL Server.

    4. Take a look at the existing stored procedures because what you need may already be there.

    5. Aaaaaand since I'm bored watching re-runs tonight, why don't we make our own stored procedure?

    6. Just write a simple SELECT to yank out some data AND remember to save :)

    7. Just to make sure, refresh the stored procedure folder on your data source in Server Explorer to see your shiny, new stored proc listed...

    8. You might even want to test it :P

    9. To get this to a point we can manipulate it using LINQ we need to have our classes and mappings in place.  Fortunately, this is a VERY easy thing to do.  Just right-click your project, choose Project...Add New Item from the Menu Bar.  Let's add a "LINQ to SQL Classes" item with the default name of "DataClasses1.dbml".

    10. Click and drag the stored procedure from Server Explorer on to the LINQ design surface.

    11. You should see the procedure showing up on the upper right of the design surface.

    12. Now let's slap some controls on our Windows Form.  How about a list box and a button?  Live on the edge!

    13. Now we need to work with database by establishing a context to it.  Next, we need to create a query expression that treats the result of the stored procedure as a table and query against it selecting only the LastName column.  Just for fun why don't we sort all the last names as well?  Finally, we will take the list of names returned and loop through them adding each one to our listBox as we go along.

      Double-click on the button to code for the Click event and write the following lines of code:
      (NOTE: make sure to substitute your server name in place of "zero_cool" and if you are using SQL Express you need to modify the server piece to read like this "SQLEXPRESS\myserver")

    14. If all goes well, you should get the following result:

    15. And that's how you use a stored procedure with LINQ.  This was a very simple example but if you really want to see a great series on LINQ go to my buddy Benko's site.   He has a webcast series on LINQ that kicks major butt! :)

      [Updated:  added tags]
Page 2 of 135 (1,345 items) 12345»