Guys , is there any possible way to assign a value to two or more variable at the same time and line ?thanx
Printable View
Guys , is there any possible way to assign a value to two or more variable at the same time and line ?thanx
no, that's only for c++/c# :(Quote:
Originally posted by pirate
Guys , is there any possible way to assign a value to two or more variable at the same time and line ?thanx
you could say a=3: b=3 , that's the shortest thing you can do, heh
not really what I mean . anyways , here is what I am trying to do :Quote:
Originally posted by MrPolite
no, that's only for c++/c# :(
you could say a=3: b=3 , that's the shortest thing you can do, heh
but seems stupid :rolleyes:VB Code:
Dim dt As DateTime Dim dtv1 As DateTime Dim dtv2 As DateTime (dtv1) & (dtv2) = dt.Now
I've tried this but gives different date and time values .as if it's not assigned to the same variable . any idea ?
VB Code:
Dim dt As DateTime Dim dtv1 As DateTime Dim dtv2 As DateTime dtv1: dtv2 = dt.Now MsgBox(dtv1.ToString) MsgBox(dtv2.ToString)
eeeh I told you, you cant do it in vb.netQuote:
Originally posted by pirate
I've tried this but gives different date and time values .as if it's not assigned to the same variable . any idea ?
VB Code:
Dim dt As DateTime Dim dtv1 As DateTime Dim dtv2 As DateTime dtv1: dtv2 = dt.Now MsgBox(dtv1.ToString) MsgBox(dtv2.ToString)
:rolleyes: :confused: :(
dude, there ISNT a way to do it. And you cant INVENT a way to do it :)Quote:
Originally posted by pirate
:rolleyes: :confused: :(
I'm waiting for VS.NET 2003 , maybe it can help me ...:rolleyes:Quote:
Originally posted by MrPolite
dude, there ISNT a way to do it. And you cant INVENT a way to do it :)
dude, you dont gotta be a dink about it!!
give the guy a break for at least trying
after lots of attemps , all are failed ....I can do it but in two lines .I need that in only one line if possible . forget it anyways,
if you are really desparate you can write a function that gets a ParamArray of integers (or longs or whatever)....
so someFunction(value, byref paramArray variables)
then you could do assign all the values in the function. One line :)
naah , Since I already started the switch (to C# ) I will forget it and do it in C#.VB is always t.. language.:D
Whats wrong with this?
VB Code:
Dim dtv1 As DateTime = DateTime.Now Dim dtv2 As DateTime = DateTime.Now MsgBox(String.Concat(dtv1.ToString, ControlChars.Tab, dtv2.ToString))
well, he was looking for thisQuote:
Originally posted by Edneeis
Whats wrong with this?
VB Code:
Dim dtv1 As DateTime = DateTime.Now Dim dtv2 As DateTime = DateTime.Now MsgBox(String.Concat(dtv1.ToString, ControlChars.Tab, dtv2.ToString))
a=b=c=9;
not supported in vb:D
Whats the point of that? Sounds like pirate is trying to be difficult ;)
what's so special you have to do it in 1 line?
normally, no problem doing it in 2 ??? :confused:
This cool , but what if I have more than two vari .anyways , I'm not trying to be difficult :D Edneeis but I was wondering if I could do it in VB.:D . THANXQuote:
Originally posted by Edneeis
Whats wrong with this?
VB Code:
Dim dtv1 As DateTime = DateTime.Now Dim dtv2 As DateTime = DateTime.Now MsgBox(String.Concat(dtv1.ToString, ControlChars.Tab, dtv2.ToString))
anyways VS.NET 2003 is VISUAL STUDIO .NET 2003 not a new plataform...it will just bring the new framework(i think) which'll have some new functions..but not changes to the languages itselvs!
when is it comming out?Quote:
Originally posted by PT Exorcist
anyways VS.NET 2003 is VISUAL STUDIO .NET 2003 not a new plataform...it will just bring the new framework(i think) which'll have some new functions..but not changes to the languages itselvs!
April ??
I got the beta from the msdn subscription a month ago. I think it won't be too long from now.
At least the upgrade will only cost $29 dollars.
http://msdn.microsoft.com/vstudio/ho...tt/default.asp