.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Basic Instincts: Collection and Array Initializers In Visual Basic 2010

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Collection Initializers are a great addition to the language and allows concise syntax in order to initialize both framework and user defined collection types.

Spotty Bowles

MSDN Magazine October 2009

View Complete Post

More Related Resource Links

Basic Instincts: Multi-Targeting Visual Basic Applications in Visual Studio 2010


Visual Studio 2010 lets you create applications that target versions of the Microsoft .NET Framework from 2.0 to 4, and each step in between. We take a look at how multi-targeting works in Visual Studio today, and explain how you should approach multi-targeting in your projects.

Spotty Bowles

MSDN Magazine June 2010

Basic Instincts: Generic Co- and Contravariance in Visual Basic 2010


Dig into the new co- and contravariance features coming in Visual Studio 2010. Binyam Kelile provides hands-on Visual Basic examples to explain how they provide more flexibility when working with generic interfaces and delegates.

Binyam Kelile

MSDN Magazine March 2010

Visual Basic: What's New in Visual Basic 2010


Learn about what's new in Visual Basic 10 straight from a program manager on Microsoft's Visual Basic team. Jonathan Aneja demonstrates time-saving features that help developers get more done with fewer lines of code.

Jonathan Aneja

MSDN Magazine April 2010

Basic Instincts: XML Programming in Visual Basic 9.0


With Visual Basic 9.0, working with XML gets much easier for developers. Here's a look at some of the new features, including LINQ support, XML literals, embedded expressions, XML properties, and XML Schema IntelliSense.

Jonathan Aneja

MSDN Magazine February 2008

Basic Instincts: Type inference in Visual Basic 2008


Visual Basic 2008 provides type inference to get the language ready to take advantage of LINQ and make your code more robust.

Bill Horst

MSDN Magazine October 2007

Basic Instincts: Programming I/O with Streams in Visual Basic .NET


If you are just now migrating from Visual Basic® 6. 0 to Visual Basic . NET, be prepared for a change, because the way you program file I/O is very different. The good news is that an idiosyncratic, proprietary approach has been replaced by an elegant and reusable one that has become an industry standard.

Ted Pattison

MSDN Magazine November 2005

Basic Instincts: Reflection in Visual Basic .NET


In the May 2005 Basic Instincts column I wrote about the Microsoft® . NET Framework support for custom attributes and attribute-based programming (see Basic Instincts: Designing With Custom Attributes).

Ted Pattison

MSDN Magazine August 2005

Basic Instincts: Naming and Building Assemblies in Visual Basic .NET


Learn what the different parts of an assembly name mean, how to create a stronly named assembly, and get other assembly security tips.

Ted Pattison

MSDN Magazine August 2003

Hands-on Labs in C# and Visual Basic: Getting Started with Development on SharePoint 2010

Use these 10 hands-on lab manuals to get started learning SharePoint 2010 development.

How to make an array of class objects in Visual Basic

How can I make an array of objects in VB.net. Here is the requirement.Basically I have a class named hotel. I need to dynamically add customersto the hotel class using the Customer class. So basically if in the Hotelclass I can have an array of Customer objects that would be great. How can I do this in VB .net ? Public Class Hotel  ' I need an array of Customer objects. objCustomers End Class   Public Class Customer Private custId As Integer Private custName As String Private custAddress As String Private custCity As StringEnd Class Pseudo code:  Dim Hilton As Hotel = new Hotel()   Hilton.objCustomers(5) ' Declare an array of 5 customer objects   Hilton.objCustomers(0).CustId=1  Hilton.objCustomers(0).CustName="JoJo Smith"  Hilton.objCustomers(0).custAddress="122 Emory Lane"  Hilton.custCity="Merry More"  .  .  .  Hilton.objCustomers(4).CustId=1  Hilton.objCustomers(4).CustName="Ice Baby"  Hilton.objCustomers(4).custAddress="66 Domino Drive"  Hilton.custCity="Miami"    End While

Setting a focus on a datagridview - visual basic 2010


i am was able to cause the mouse wheel to work on my datagridview.

now i have noticed that when the form first loads i actually need to click the datagridview to set the focus on it and then i can scroll

i added two line for my form load event

    ' Selecting first datagrid row
        grdAccountTypes.Rows(0).Selected = True

but that didn't solve my problem either.


any ideas ?


Visual Basic 9.0 error in Visual Studio 2010


I just upgraded from Visual Studio 2005 to Visual Studio 2010 yesterday. I tried opening my site; it started the conversion wizard and seemed to work OK. However, I get the error "Visual Basic 9.0 does not support this kind of lambda expression." Here is my code:

Dim MatchLength As Integer = Url.Path.Length
                        Dim D As GetRedirectedUrlDelegate = _
          Dim NewQuerystring As QuerystringContext = Url.QuerystringContext.Clone()
          Return Url.Clone(NewPath, NewQuerystring)
        End Function

            Match = New RedirectMatch(MatchLength, d)
            Return True

The error is on the "Function()" line. I thought multi-line lambda functions were one of the new VS2010 features. Why am I getting a VB9.0 error

visual basic 2010 and oracle


i am new to visual basic.i have visual basic 2010 express edition and oracle 10g express installed.

I am trying to connect to an Oracle database and I want to add an Oracle Data Source, but the only options that I have are:
Microsoft Access DB File
Microsoft SQL Server Compact 3.5
Microsoft SQL Server DB File

i want to use oracle. so please help me. can someone please tell me why visual basic is not showing oracle option and how to get the oracle shown in the options.i tried adding the reference oracle.dataAccess.dll file but still it is not working

How to run Office macros by using Automation from Visual Basic .NET

This step-by-step article describes how to call Office macros from a Visual Basic .NET Automation client.

You can use Microsoft Office Automation to open a document or create a new document that contains a Visual Basic for Applications (VBA) macro and execute the macro at run time.

Dynamically Create Controls in ASP.NET with Visual Basic .NET

This step-by-step article describes how to dynamically create controls for an ASPX Web page.

The sample project does the following:
It creates two TextBox controls.
It verifies that the TextBox contents (TextBox.text) and attributes are saved across posts to the server.
It describes how events that are posted by a dynamically created control are handled.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend