473,378 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Space function

In Vb 6 exist the SPACE function
How to replace this function in vb dot net?
Nov 21 '05 #1
22 14230
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
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
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
"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
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
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
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
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
"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
"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
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
"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
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
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
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
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
"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
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
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
"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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Killer | last post by:
Good Morning, I have a question. Is there a function like ISNULL but for the space value(example ISSPACE)? THANKS
3
by: mike parr | last post by:
What is the equivalent of Space in C#? Space(10 - Len(Trim(txtAccessAccountsID.Text))) Thanks, Mike
5
by: ad | last post by:
Is there fucntion in C#, which will return a string consist of a given number of space, like Space(5)-> " ";
4
by: kollatjorva | last post by:
Hi all I'm trying to get a value from an xml node 'Publisher' use the value as a name of an .css class. This works fine until I get a value from the Publisher node with white space in it. I've...
10
by: kevinliu23 | last post by:
HI, I am new to Python and wanted to know how to check for the remaining disk space on my Windows machine using Python? I was thinking of using the command line "dir" and trying to extract the...
0
by: ajay pratap singh111 | last post by:
I have used space() and format() function in one of my project on excel vba. The project was running on my system but when i made its setup file using innoSetup and gave it to my client then it's...
3
by: preethi303 | last post by:
Hi, I'm using VB 2005 and I have a problem formatting a string when I use the print preview dialog box. I'm using just the vbCrLf character and the Space function to correctly align my data and...
1
by: nassegris | last post by:
Hello everyone! I'm trying to write a regular expression to capture VB6 function definitions and I'm abit stuck. The rules are: Function header: * Must contain the words SUB or FUNCTION *...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.