It's ın C# language definitions. Using it you don't need to escaping. ie:
In C# \ is escape char. A path like c:\temp\myPath should be written as:
string myPath = "c:\\temp\\mypath";
or
string myPath = @"c:\temp\mypath";
It also lets you writing text..endtext style strings:
string myString = @"my string continues on next line.
normally you should escape a name like O'hara";
Cetin
>Cetin.
>What is the significance of "@" when initializing the variable strConn?
>The code doesn't seem to work without it and I haven't seen it in other examples I've seen.
>
>thanks
>
>
>
>>Then use Ctrl+F5 otherwise console applications do not wait after outputting their results. ie:
>>
>>
>>// Add these to top
>>using System.Data;
>>using System.Data.OleDb;
>>
>>
>> static void Main()
>> {
>> string strConn = @"Provider=VFPOLEDB;Data source=
>>C:\Program Files\Microsoft Visual FoxPro 9\Samples\Data\testdata.dbc;";
>>
>> string strQuery = "select * from customer where country = 'USA'";
>>
>> OleDbConnection cn = new OleDbConnection(strConn);
>> cn.Open();
>>
>> OleDbCommand cmd = new OleDbCommand(strQuery,cn);
>> OleDbDataReader rdr = cmd.ExecuteReader();
>>
>> while (rdr.Read())
>> {
>> Console.WriteLine("{0}, {1}, {2}",
>> rdr["cust_id"],
>> rdr["Company"],
>> rdr["Contact"]);
>> }
>> rdr.Close();
>> cn.Close();
>> }
>>
>>Cetin
>>
>>
>>>Hi Cetin.
>>>I pressed F5 and it did "blink" like it was doing something, but no out put.
>>>I'm trying to connect to a foxpro table and updating a row.
>>>
>>>And I even put
>>>
>>>
>>>.
>>>.
>>>.
>>>}
>>>Console.WriteLine("Hello .NET World");
>>>{
>>>
>>>
>>>in my code to see if I can get any response... but no response yet.
>>>
>>>
>>>>>>>greetings.
>>>>>>>
>>>>>>>Is there a way to compile a .NET program in the .NET interface (is the right term) rather then doing "csc MyProgram.cs" on the command line?
>>>>>>>
>>>>>>>TIA.
>>>>>>
>>>>>>Sam,
>>>>>>
>>>>>>Do you have Visual Studio .NET or Visual C# Express installed on your PC?
>>>>>
>>>>>
>>>>>I'm at home and all I have right now is Express.
>>>>>I'm expecting the 2005 Professional "Academic" edition next week.
>>>>>
>>>>>thanks
>>>>
>>>>Doesn't matter really. F5 would compile and run. Or build (doesn't express menu have it?).
>>>>Cetin