String and String[]What will be the advantage of using
myString: String[10]
over
myString: String
Man wrote:
> What will be the advantage of using
> myString: String[10]
> over
> myString: String
"String[10]" is a fixed-length, statically allocated, Ansi-based ShortString.
"String" is a dynamic-length, dynamically allocated, reference counted, Ansi-based
or Unicode-based (depening on Delphi version) Long string.
Unless you absolutely need the static, fixed length nature of ShortString,
such as in records that interact with external systems, you should stay ...
String and string?
Hi guys,
I was wondering the difference between small letter string type and a capital letter String type. Does anyone know about this? Highly appreciate for your answers! Thankz!
The "proper" version is String, as it references the System.String class of the .NET Framework Class Library.
The ability to use string is provided by C#, where it is an alias to String.
Similarly, the "proper" version of an integer is Int32, as it references System.Int32. The ability to use int is provided by C#, and the ability to use Integer is provided by VB.NET, and both int and Integer are aliases...
string and string[]
hello,
whats the difference here
between string and string[]
thanks
"string" denotes an item of type String
"string[]" denotes an array of type String itemsThanks, EdMicrosoft MVP - ASP/ASP.NET
Gracia mon ami...
string() = string()
this code does not work (not instance of object)
Dim Items(), Other() As String
Items = New String() {"A","B","C"}
Other = New String() {}
Other = Items
how can I get all the values ?
angiras
Hi,
If I understand your requirement correctly, this should do it
Dim Items() As String = {"A", "B", "C"}
Dim Other(Items.Length - 1) As String
Items.CopyTo(Other, 0)
To more closely match you code above, but this will be less efficient
Dim Items(), Other() As String
...
string to string[]
Hi,
I've got this code :
string[] Params;
string SQL = "SELECT * FROM T_MANAGEMENT_PAGES";
SqlCommand myCommand = new SqlCommand(SQL, myConnection);
myConnection.Open();
SqlDataReader myReader = myCommand.ExecuteReader();
try
{
while (myReader.Read())
{
Params_Type = myReader.GetValue(0).ToString();
}
}
catch
{
}
finally
{
}
myReader.Close();
My problem is to obtain Params_Type.
But each time, it says : "impossible to convert '[object]' in 'string[]' &quo...
How to convert a String into a UTF8 String
Hello! I want to convert a normal String into a UTF8 String
for example:myString = BüromyUTF8String = Büros
I dont know how to do this.
In PHP you can do this with myUTF8String = utf8_encode(myString)
Thank you for all hints!
try this
string test ="ÁÉÍÓÚ áéíóú àèìòù äëïöü Ññ €";
byte[] a= System.Text.Encoding.UTF8.GetBytes(test);
string test2= System.Text.Encoding.UTF8.GetString(a);
greetingsBest Regards,Sebastián DopicoBlog Desarrollador
Thank you Sebastián!
If I make it like that - test2 looks the same as test.But I think my problem is solved. (Someone tol...
convert octet string to string
I'm trying to use IDM 3.5.1 provision an AD environmnet with users from
eDir.
We wanna provision as much info as possible, but one attribute gives us
headaches. This is an auxiliary attribute associated with each user in
eDir that has it's syntax set to octet string. Problem is we need to
provision this over to another attribute in AD that uses string as its
syntax.
Is thee a way through XPath or ECMA script to have the value converted
during the provisioning? I've no experience with either XPath or ECMA so
please be detailed in your replies.
Thx
--
jdoeconsu...
Convert string to string array.Hi,
We have a string array argument in datawindow object for 'IN' sql
statement.
Our user enter a string in a single line edit.
How to convert the string to a string array for the argument of
datawindow?
ex. user input : 'A', 'B', 'C'
=> str_arr[]={'A', 'B', 'C'}
dw_1.retrieve(str_arr)
Thanks in advance.
Take a look at the n_cst_string object in the pfc. It has a method called
of_ParseToArray that does exactly what you're looking for. It's a pretty
simple task to 'port' the code ...
Convert UPPERCASE string to Upper-Lower Case (ie. THIS IS MY STRING -> This Is My String)
I recently had the need to convert an all capitalized string to upper/lower case, but couldn't find anything to do it in XSLT 1.0. If it helps anyone out, I wrote the following:
Call it using:
<xsl:template match="Ads"> <xsl:call-template name="ToUpperLowerCase"> <xsl:with-param name="inputString" select="YOURSTRINGHERE"/> <xsl:with-param name="index" select="0"/> <xsl:with-param name="loopCount" select="st...
a string in a string in a string in my code behind....
I know my title talk about code-behind, but this is really a client-side problem (and surely a newby one too, sorry about that).I have a javascript function that my make a little text appear when the onmouseover event of a link is activated.So, normally, if my link was inside my html code, it would be something like this:<a href = "whocare.com" onmouseover="poplink('I want to test something');">test</a>BUT, for some reason, I have to write this part in code behind with the LiteralControl function....and that will give something like that:this.Controls.Add(new LiteralCo...
m_AVP As IDictionary(Of String, String) = New Dictionary(Of String, String) ,not defined?
I am creating a usercontrol
(ascx,ascx.vb)
I have used
Imports
system.Collections
Imports system.Collections.Generic
Private m_AttributeValuePair As IDictionary(Of String, String) = New Dictionary(Of String, String)
But I am gettting an error
“Type Dictionary is not defined”
And also I am getting intelisense to type the line
But what is the reason for my error
?
How can I get escape from the error
?
this error is not showing today
...
Convert Unicode string to Readable String
Novell Identity Manager 3.5.1
RedHat Linux enterprise edition.
SOAP IDM driver..
When I query on an attribute "firstName" from IDM, the application
returns value on that atrribute as the "English\u00c6". It looks like
the string comes as a Unicode string..
I need help to reformat that value so that it can be readable for my
rules in my driver..
Any help guys?
Regards,
M.
--
love anything that talks binary!
------------------------------------------------------------------------
On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
>...
converting string to integer, subtracting strings.
Hi,
I have a textbox into which the user will enter a number
I then have button that when the user clicks, the number taken from the textbox will be subtracted by one or more(depending on the users situation) and displayed in a label.
The problem i am having at the moment is that when i attempt to do this an error comes up saying that "the operator '-' cannot be used with string or int".
String Score1 = txtScore1.Text:
String netScore1;
netScore1 = Score1 - 1;
lblNetScore1.Text = netScore1;
I have ...
Convert Object/String to a Base64 String
The function below converts a normal string to a Base64 string.
This can come in pretty handy ;)
public static string getBase64Encoded(string inString)
{
byte[] inData;
char[] charArr;
//System.IO.StringReader sr = new System.IO.StringReader(inString);
//sr.Read(inData, 0, inString.Length);
charArr = inString.ToCharArray();
inData = new byte[charArr.Length];
for(int i = 0; i < charArr.Length; i++)
{
inData[i] = (byte)charArr[i];
}
return System.Convert.ToBase64String(inData, 0 , inData.Length);
}
...