Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

String.Concat Method (String, String, String, String)

Concatenates four specified instances of String.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public static string Concat (
	string str0,
	string str1,
	string str2,
	string str3
)
public static String Concat (
	String str0, 
	String str1, 
	String str2, 
	String str3
)
public static function Concat (
	str0 : String, 
	str1 : String, 
	str2 : String, 
	str3 : String
) : String
Not applicable.

Parameters

str0

The first String.

str1

The second String.

str2

The third String.

str3

The fourth String.

Return Value

The concatenation of str0, str1, str2, and str3.

An Empty string is used in place of any null object in the array.

In the following code example the DataBinding output is generated using this Concat method.

myDataBindingCollection = DataBindings;
myEnumerator = myDataBindingCollection.GetEnumerator();
while(myEnumerator.MoveNext())
{

   myDataBinding2 = (DataBinding)myEnumerator.Current;
   String dataBindingOutput1,dataBindingOutput2,dataBindingOutput3;
   dataBindingOutput1=String.Concat("The property name is ",myDataBinding2.PropertyName);
   dataBindingOutput2=String.Concat("The property type is ",myDataBinding2.PropertyType.ToString(),"-",dataBindingOutput1);
   dataBindingOutput3=String.Concat("The expression is ",myDataBinding2.Expression,"-",dataBindingOutput2);
   WriteToFile(dataBindingOutput3);
   myDataBindingExpression2 = String.Concat("<%#",myDataBinding2.Expression,"%>");
   myStringReplace2 = myDataBinding2.PropertyName.Replace(".","-");
   myHtmlControlDesignBehavior.SetAttribute(myStringReplace2,myDataBindingExpression2,true);
   int index = myStringReplace2.IndexOf('-');
}// while loop ends

myDataBindingCollection = get_DataBindings();
myEnumerator = myDataBindingCollection.GetEnumerator();
while (myEnumerator.MoveNext()) {
    myDataBinding2 = (DataBinding)(myEnumerator.get_Current());
    String dataBindingOutput1, dataBindingOutput2, 
        dataBindingOutput3;
    dataBindingOutput1 = String.Concat("The property name is ", 
        myDataBinding2.get_PropertyName());
    dataBindingOutput2 = String.Concat("The property type is ", 
        myDataBinding2.get_PropertyType().ToString(), "-", 
        dataBindingOutput1);
    dataBindingOutput3 = String.Concat("The expression is ", 
        myDataBinding2.get_Expression(), "-", dataBindingOutput2);
    WriteToFile(dataBindingOutput3);

    myDataBindingExpression2 = String.Concat("<%#", 
        myDataBinding2.get_Expression(), "%>");
    myStringReplace2 = myDataBinding2.get_PropertyName().
        Replace(".", "-");
    myHtmlControlDesignBehavior.SetAttribute(myStringReplace2, 
        myDataBindingExpression2, true);
    int index = myStringReplace2.IndexOf("-");
} // while loop ends

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0

Community Additions

Show:
© 2015 Microsoft