Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questiongetting System.Type object Pin
indian14326-Aug-08 0:34
indian14326-Aug-08 0:34 
AnswerRe: getting System.Type object Pin
Manas Bhardwaj26-Aug-08 0:58
professionalManas Bhardwaj26-Aug-08 0:58 
AnswerRe: getting System.Type object Pin
N a v a n e e t h26-Aug-08 1:15
N a v a n e e t h26-Aug-08 1:15 
GeneralRe: getting System.Type object Pin
indian14326-Aug-08 1:38
indian14326-Aug-08 1:38 
GeneralRe: getting System.Type object Pin
indian14326-Aug-08 5:41
indian14326-Aug-08 5:41 
AnswerRe: getting System.Type object Pin
Guffa26-Aug-08 4:06
Guffa26-Aug-08 4:06 
AnswerRe: getting System.Type object Pin
Polymorpher27-Aug-08 14:19
Polymorpher27-Aug-08 14:19 
Questionsome problem when change C# to VB.net Pin
Golden Jing26-Aug-08 0:21
Golden Jing26-Aug-08 0:21 
Under is some code of C#, i would like all of you to show me how can to VB.net because i don't know C# at all and i don't know this code as well.
Thanks for your help...

public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();

allStands = new List[] { Stand1plates, Stand2plates, Stand3plates };

// Stand2plates.Add(3);
}

List[] allStands;
List Stand1plates = new List();
List Stand2plates = new List();
List Stand3plates = new List();

private void MoveFromTo(int source, int dest)
{
int top = allStands[source-1][allStands[source-1].Count - 1];
allStands[source - 1].Remove(top);
allStands[dest-1].Add(top);

RedrawPanels();

}
=================================
I change it to VB.net as bellow:

Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
' Stand2plates.Add(3);
allStands = New List() {Stand1plates, Stand2plates, Stand3plates}
End Sub

Private allStands As List(Of Integer)
Private Stand1plates As New List(Of Integer)
Private Stand2plates As New List(Of Integer)
Private Stand3plates As New List(Of Integer)

Private Sub MoveFromTo(ByVal source As Integer, ByVal dest As Integer)
Dim top As Integer = allStands(source - 1)(allStands(source - 1).Count - 1)
allStands(source - 1).Remove(top)
allStands(dest - 1).Add(top)

RedrawPanels()
End Sub
End Sub

but it has error where underline. what's problem ? How do i change it ?
Thanks for your helps.

VB.Net

AnswerRe: some problem when change C# to VB.net Pin
Manas Bhardwaj26-Aug-08 1:00
professionalManas Bhardwaj26-Aug-08 1:00 
AnswerRe: some problem when change C# to VB.net Pin
Tom Deketelaere26-Aug-08 1:36
professionalTom Deketelaere26-Aug-08 1:36 
RantRe: some problem when change C# to VB.net Pin
jzonthemtn26-Aug-08 5:55
jzonthemtn26-Aug-08 5:55 
Questionmaking it possible for VBA macros to store variables at the application scope Pin
fulbright26-Aug-08 0:05
fulbright26-Aug-08 0:05 
QuestionHow to capture the details of visited web site from a computer Pin
yesu prakash25-Aug-08 23:00
yesu prakash25-Aug-08 23:00 
AnswerRe: How to capture the details of visited web site from a computer Pin
jzonthemtn26-Aug-08 8:12
jzonthemtn26-Aug-08 8:12 
QuestionSet focus to Data Grid View Cell using vb.net Pin
~Khatri Mitesh~25-Aug-08 21:51
~Khatri Mitesh~25-Aug-08 21:51 
QuestionChinese characters cannot read from file properly Pin
stephenman25-Aug-08 21:06
stephenman25-Aug-08 21:06 
AnswerRe: Chinese characters cannot read from file properly Pin
Mycroft Holmes25-Aug-08 21:28
professionalMycroft Holmes25-Aug-08 21:28 
GeneralRe: Chinese characters cannot read from file properly Pin
stephenman25-Aug-08 21:55
stephenman25-Aug-08 21:55 
GeneralRe: Chinese characters cannot read from file properly Pin
Mycroft Holmes25-Aug-08 22:01
professionalMycroft Holmes25-Aug-08 22:01 
GeneralRe: Chinese characters cannot read from file properly Pin
stephenman25-Aug-08 22:25
stephenman25-Aug-08 22:25 
AnswerRe: Chinese characters cannot read from file properly Pin
Guffa26-Aug-08 6:01
Guffa26-Aug-08 6:01 
QuestionError Msg: Error HRESULT E_FAIL has been returned from a call to a COM component Pin
honeyashu25-Aug-08 20:58
honeyashu25-Aug-08 20:58 
QuestionHow to append " character in VB.Net string. Pin
indian14325-Aug-08 20:55
indian14325-Aug-08 20:55 
AnswerRe: How to append " character in VB.Net string. Pin
Manas Bhardwaj25-Aug-08 21:05
professionalManas Bhardwaj25-Aug-08 21:05 
GeneralRe: How to append " character in VB.Net string. Pin
indian14325-Aug-08 21:34
indian14325-Aug-08 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.