|
use System.IO.File.ReadAllText or System.IO.File.ReadAllLines
hope it will help
Becoming Programmer...
|
|
|
|
|
can anyone gimme an example?
i m using windows forms c#.
|
|
|
|
|
SqlConnection dataConnection = new SqlConnection();
string connection = File.ReadAllText(filepath);
dataConnection.ConnectionString=connection;
hope it will help
Becoming Programmer...
|
|
|
|
|
|
I have a DataGrid Object and I've binded a data set to it. It works correctly but I want to change caption on column header but those is always name of field in database please help me to change it thanks.
Agh
|
|
|
|
|
May be you can change the sql used for binding...
for example,you could change "select id from user" into "select id as '<%=what you want%>' from user "...
I am not sure you get my meaning for my bad english.
My home:http://hi.baidu.com/dotnetcampus
|
|
|
|
|
hi,
I want to run a delphi application, but Just-in-time debugger of VS 2005 shows and don't permit to run it.
how can I temporarily disable it?
Best wishes
|
|
|
|
|
|
Google for the AeDebug registry key.
|
|
|
|
|
hi there,
i want to set my own size to page setup dialog before showing
for example:
i want to set size to "A4" instead of "Letter"
i tried it by this line:
pageSetupDialog1.PageSettings.PaperSize.Kind = System.Drawing.Printing.PaperKind.A4;
but it gave error that its read only
anyone know how can i do that?
thanks
Becoming Programmer...
|
|
|
|
|
How to determine programmatically if Framework 2.0 Full trust is set in trusted sites or not?
|
|
|
|
|
I'm not a CAS expert, but can you decorate a method with [PermissionSet(SecurityAction.Demand, Name = "FullTrust")], then call that method? If the method throws a security exception, you're not running in full trust.
|
|
|
|
|
there is many program that show source code in dll file. But I know you can do something to privent them to see your source code in dll file.
by the way , I cant see my comment when I create an instance of a class when I use dll file instead of source code. when I use source code( for example: class.cs) there is no problem.I can see comments. but when I use Class.dll, I cant see comment.
please guide me.
thanks
mehran
|
|
|
|
|
mohandesmehran wrote: there is many program that show source code in dll file. But I know you can do something to privent them to see your source code in dll file
Try obfuscating the dll file.
mohandesmehran wrote: I cant see my comment when I create an instance of a class when I use dll file instead of source code
What comment don't you see? The summary of the method?
I will use Google before asking dumb questions
|
|
|
|
|
yes. I cant see summary.please help me more about dll file.
thanks
|
|
|
|
|
In the compiler options somewhere is an option to generate an XML file, find it, and click it.
This will turn all your summaries and whatnot, into an XML file, which is read when you use your DLL in another project. Just remember to have the xml file in the same place as the dll.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
I couldnt find this file. please guide me!
|
|
|
|
|
As Andrei said, ofuscating prevents your codes to be decomplied (to some extent).
But remember that when you use the source of the dll (i.e. class.cs) in your project file, in fact no dll is built!! The source code is compiled and linked into your executable file!!
This is where the difference comes from.
|
|
|
|
|
I create my dll file in Class Library Project and use that Dll file in my asp.net web application.
I dont know anything about "ofuscating" please guide me more.
|
|
|
|
|
mohandesmehran wrote: I dont know anything about "ofuscating" please guide me more.
Google it. There are many different tools out there to help obfuscate your code.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi.
in DateTime.Now , Now is a property. But when we set a dot after Now we can see a list of methods and properties, such as DateTime.Now.AddDay() , DateTime.Now.Date , DateTime.Now.AddMonth()
how can I do it?
thanks
mehran
|
|
|
|
|
If you have looked carefully at the type returned by the Now property, you might have seen that it's a DateTime object, which has properties and methods. So if you want to create a property that "has methods" you just need to create a property that returns an object that has other properties and methods.
Hope it helps.
I will use Google before asking dumb questions
|
|
|
|
|
|
This is so simple!
DateTime.Now is of type of class 'Date' which has itself different properties and methods!
You can create a class, and add any methods or properties in that class.
In an other class, now you may have a property of the latter class type.
|
|
|
|
|
I have to read the last 5 lines of several very very huge ASCII files, several times.
I want to see if it is possible to read only those last lines, instead of reading the whole junk data and getting to those 5 ending lines.
Could someone please help me, how to decrease this amount of waste of cpu time and un-wanted I/O?
|
|
|
|