By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

Space function

P: n/a
In Vb 6 exist the SPACE function
How to replace this function in vb dot net?
Nov 21 '05 #1
Share this Question
Share on Google+
22 Replies


P: n/a
Pippo,

Although this is more a question to be answered by Ken.

http://msdn.microsoft.com/library/de...vafctSpace.asp

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
Hi Pippo:

Try:

Microsoft.VisualBasic.Strings.Space(number)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Pippo" <Pi***@discussions.microsoft.com> escribió en el mensaje
news:10**********************************@microsof t.com...
In Vb 6 exist the SPACE function
How to replace this function in vb dot net?

Nov 21 '05 #3

P: n/a
Thanks for your help...

But in yours replies you use the Microsoft.VisualBasic namespace

In my project i want to use a native dot net function and not a old vb
function

Is there an another way?

"Carlos J. Quintero [.NET MVP]" wrote:
Hi Pippo:

Try:

Microsoft.VisualBasic.Strings.Space(number)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Pippo" <Pi***@discussions.microsoft.com> escribió en el mensaje
news:10**********************************@microsof t.com...
In Vb 6 exist the SPACE function
How to replace this function in vb dot net?


Nov 21 '05 #4

P: n/a
"Pippo" <Pi***@discussions.microsoft.com> schrieb
In Vb 6 exist the SPACE function
How to replace this function in vb dot net?

new string(" "c, 17)
Armin
Nov 21 '05 #5

P: n/a
Then use:

New String(" "c, n)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Pippo" <Pi***@discussions.microsoft.com> escribió en el mensaje
news:6A**********************************@microsof t.com...
Thanks for your help...

But in yours replies you use the Microsoft.VisualBasic namespace

In my project i want to use a native dot net function and not a old vb
function

Is there an another way?


Nov 21 '05 #6

P: n/a
Thanks it works fine

Thanks guys

"Carlos J. Quintero [.NET MVP]" wrote:
Then use:

New String(" "c, n)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Pippo" <Pi***@discussions.microsoft.com> escribió en el mensaje
news:6A**********************************@microsof t.com...
Thanks for your help...

But in yours replies you use the Microsoft.VisualBasic namespace

In my project i want to use a native dot net function and not a old vb
function

Is there an another way?


Nov 21 '05 #7

P: n/a
Pippo wrote:
Thanks for your help...

But in yours replies you use the Microsoft.VisualBasic namespace

In my project i want to use a native dot net function and not a old vb
function

Is there an another way?


How about

"".padright(n)

where n is the number of spaces you need.
--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #8

P: n/a
Pippo,

Endless those replies.

The Microsoft.VisualBasic namespace is a full part of the Net Framework

In that are the namespaces system.net And Microsoft.VisualBasic

Standard uses VisualBasic both.

If you want to use both in C#, C++ or J# than you have to set in those a
reference to that.

That is all.

Cor
Nov 21 '05 #9

P: n/a
"Pippo" <Pi***@discussions.microsoft.com> schrieb:
But in yours replies you use the Microsoft.VisualBasic namespace

In my project i want to use a native dot net function and not a old vb
function


As it's impossible to write VB.NET applications which don't reference
"Microsoft.VisualBasic.dll", there is absolutely no reason for not using the
functionality of this library. Developing in VB.NET without using
'Microsoft.VisualBasic' is developing with VB.NET without actually using it.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #10

P: n/a
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
As it's impossible to write VB.NET applications which don't reference
"Microsoft.VisualBasic.dll", there is absolutely no reason for not using the
functionality of this library. Developing in VB.NET without using
'Microsoft.VisualBasic' is developing with VB.NET without actually using it.


I noticed that there doesn't seem to exist a Microsoft.CSharp.dll. What's the
significance of that, if any?

Nov 21 '05 #11

P: n/a
It means that the capabilities added by the VisualBasic.dll can also be used
by c# users.
No need to define things twice.
Best regards,
Alejandro Lapeyre

"Alex" <pl******@no.messages> escribió en el mensaje
news:Oi**************@TK2MSFTNGP14.phx.gbl...
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
As it's impossible to write VB.NET applications which don't reference
"Microsoft.VisualBasic.dll", there is absolutely no reason for not using
the
functionality of this library. Developing in VB.NET without using
'Microsoft.VisualBasic' is developing with VB.NET without actually using
it.


I noticed that there doesn't seem to exist a Microsoft.CSharp.dll. What's
the
significance of that, if any?

Nov 21 '05 #12

P: n/a
"Alejandro Lapeyre" <Al**************@jotmail.com> schrieb:
It means that the capabilities added by the VisualBasic.dll can also be
used by c# users.
No need to define things twice.


LOL...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #13

P: n/a
http://www.ftponline.com/vsm/2004_08...ettingstarted/

;-)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> escribió en el mensaje
news:uU****************@TK2MSFTNGP10.phx.gbl...
"Alejandro Lapeyre" <Al**************@jotmail.com> schrieb:
It means that the capabilities added by the VisualBasic.dll can also be
used by c# users.
No need to define things twice.


LOL...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #14

P: n/a
Carlos,

http://www.ftponline.com/vsm/2004_08...ettingstarted/

When I am able will I show it as soon as possible in the General newsgroup
to Jon Skeet, that will give a long thread again.

I once translated a VBNet sample literally to C# in the CSharp newsgroup
using this reference, however there was not any comment

:-)

Cor
Nov 21 '05 #15

P: n/a
Carlos,

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> schrieb:
http://www.ftponline.com/vsm/2004_08...ettingstarted/

;-)


;-)

From the article:

| However, .NET makes it possible for C# developers to take advantage
| of all the power of Visual Basic .NET.

I doubt that ;-))).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #16

P: n/a
Hi Herfried and Cor,

I personally use VB.NET, although I tend to avoid Microsoft.VisualBasic as
much as possible and during all these years I have found only this gem in
the Microsoft.VisualBasic namespace: the
Microsoft.VisualBasic.Information.Typename(object) function. It gives you
the actual type of a __ComObject when the debugger or the other .NET
Framework functions don´t give you a clue...
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> escribió en el mensaje
news:%2****************@TK2MSFTNGP15.phx.gbl...
Carlos,

;-)

From the article:

| However, .NET makes it possible for C# developers to take advantage
| of all the power of Visual Basic .NET.

I doubt that ;-))).

Nov 21 '05 #17

P: n/a
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
| However, .NET makes it possible for C# developers to take advantage
| of all the power of Visual Basic .NET.

I doubt that ;-))).
But, can the VB.NET developers take advantage of all of the features available
in C#?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... C# will support some additional type keywords and operators for dealing with
nullable types:

<URL:http://msdn2.microsoft.com/library/2cf62fcy(en-us,vs.80).aspx>


(I'm not trying to be argumentative here. I want to understand the
implications of the differences between the two.)

Nov 21 '05 #18

P: n/a
Alex,

No, there are differences and probably those will stay because it are
different development teams.

For the VBNet development team it is of couse easier to get the same things
as in C# than in the opposite posistion.

C# is ECMA.

Just my thought,

Cor
Nov 21 '05 #19

P: n/a
Cor,

"Cor Ligthert" <no************@planet.nl> schrieb:
For the VBNet development team it is of couse easier to get the same
things as in C# than in the opposite posistion.

C# is ECMA.


C# is standardized by ECMA, but Microsoft decides its roadmap.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #20

P: n/a
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
No, there are differences and probably those will stay because it are
different development teams.


So it would seem that C# has the advantage. C# can access all that's provided
to VB via the Microsoft.VisualBasic.dll, however the opposite is not
true.(URL:http://msdn2.microsoft.com/library/2...us,vs.80).aspx)
Nov 21 '05 #21

P: n/a
"Alex" <pl******@no.messages> schrieb:
No, there are differences and probably those will stay because it are
different development teams.


So it would seem that C# has the advantage. C# can access all that's
provided
to VB via the Microsoft.VisualBasic.dll, however the opposite is not
true.(URL:http://msdn2.microsoft.com/library/2...us,vs.80).aspx)


Both programming languages provide different advantages, C#'s features are
not a subset of VB.NET's features and vice-versa. VB.NET, for example,
supports the 'Declare' statement, optional parameters, declarative event
handling, declarative interface implementation and much more which C#
doesn't support.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #22

P: n/a
Alex,

I think that you understood a previous reply from Herfried not well, where
he wrote "I doubt that" with a :-)) because he does not doubt at all.

There are (what is an advantage) advantages in C#, as well as there are
advantages in VBNet.

For me is the biggest one from VBNet the background compiling. That is the
hardest part for someone used to the IDE from VBNet to work with C#. To get
your typing errors you have first to build a project.

Although there is a lot more, however not something that prevents you in
general in both of them to make almost the same program.

Cor
Nov 21 '05 #23

This discussion thread is closed

Replies have been disabled for this discussion.