Code Snippet for getting a record from a binding source

For those who attended my SqlMobile webcast today, here is the code snippet I used to get the current record for a binding source. You may have to update the name of the bindingSource variable to match the name used in your application. To use this snippet save it to a text file called ".snippet" and put it in your My Documents\Visual Studio 2005\VB\My Code Snippets folder.

<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Current Row From Binding Source</Title>
<Shortcut>CurrentRowFromBindingSource</Shortcut>
<Description>Code snippet for getting a DataRowView object out of the BindingSource.Current property</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="VB" Kind="method body">
<![CDATA[Dim currentRowView As System.Data.DataRowView = DVDsBindingSource.Current
Dim currentRow As DVDDataSet.DVDsRow = currentRowView.Row]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>