|
So, what's your question? If you want to change your program so that it deletes folders which are n hours old, instead of n days old, then you change deleteOldFiles(path, DateTime.Now.AddDays(-DaysOld)); to deleteOldFiles(path, DateTime.Now.AddHours(-DaysOld));
And please, put your code in <pre> tags. It makes it much easier to read
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Hi to all:
I have problem whit editing my datagridview
When i edit my datagridview row and i press enter butoon, the row that i chenged it be lest.
|
|
|
|
|
your question is not clear.... please make your question clear so that our experts can answer...
|
|
|
|
|
Hi,
I need help from u all. I'm using combobox control in my program. My problem is if i select the items more than once from combobox it should display an error message.
plz help with some sample codes...
Thanks in advance......
Elizabeth.......
|
|
|
|
|
send the code and the error message...
|
|
|
|
|
Hi All,
I have Class library with name and namespace Dipak.DataAccess and within this name space there is class called DataAccess.
I have another class library with name and namespace Dipak.ESchool.Data and within this namespace there is class called StudentData. Now i have added reference of Dipak.DataAccess in Dipak.ESchool.Data and i have added using Dipak.DataAccess statement in StudentData class .
While calling method of Dipak.DataAccess i have to use full name like DataAccess.DataAccess.GetDataSet(),after adding using Dipak.DataAccess statement.
And when i changes namespace from Dipak.ESchool.Data to ESchool.Data i need not to give full name for method call i am able call with classname.methodname, no need to add namespace name.
Can any one explain me why it is so?
And what i need to do for correcting above problem.
<br />
namespace Dipak.DataAccess<br />
{<br />
public class DataAccess;<br />
{<br />
}<br />
using Dipak.DataAccess<br />
using Dipak.ESchool.Common;<br />
<br />
namespace Dipak.ESchool.Data<br />
{<br />
public class StudentData<<br />
{<br />
DataAccess.DataAccess.GetDataSet()<br />
}<br />
}<br />
Thanks
Dipak Thesiya.
dipak.thesiya@gmail.com
dipak
|
|
|
|
|
Hi,
you have to use the fullname DataAccess.DataAccess.GetDataSet because the compiler doesn't know if you write only one DataAcces what you mean: namespace or class.
I suggest not to use the same name for a class and a namespace. That can cause too much trouble as you see.
Regards
Sebastian
P.S.: What about naming the DataAccess-namespace "DataAccessLayer"?
|
|
|
|
|
Thanks for your reply...
I tried using ur solution...it works...
But as far as concept is concerned ....i have included using statement as using Dipak.DataAccess....so at this point compiler will be knowing the clearly that this name space is referenced...what matters if same class name is there in namespace...
dipak
|
|
|
|
|
DIPAK@EMSYS wrote: what matters if same class name is there in namespace...
What matters is that the M$ coders didn't provide for this scenario. FWIW I agree with you, but the fact remains that we have to work with the tools we have.
If this is the first of VSs little annoyances that you have encountered, then you are a lucky, lucky chap.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
thanks buddy..
but as i have mentioned in my problem description that if i changes my namesapce from Dipak.ESchool.Data to only ESchool.Data it works fine.
But with Dipak.ESchool.Data i have to make call like DataAccess.DataAccess.GetDataSet().
As per naming standerds for namespace we follows Compnyname.projectname.namespacename and thats what i have done...
Dipak my compny name....DataAccess and ESchool my Project name ....
dipak
|
|
|
|
|
Hi everyone,
I'm using datetimepicker in my program. If i enter time morethen once means it should specify an error message.
plz do help me with sample code...
thanks in advance...
Elizabeth....
|
|
|
|
|
Why not disable it after first selection in the ValueChanged event?
If not, then set a flag to true in the same event and let user change date only if the flag is false.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Dear Developers,
I am user level settings...
How To change the path of "user.config"
I want to create it in my Project Output directory or target directory On Deployment.Generally its been created in local settings..
Thanking you
|
|
|
|
|
I am creating setup project fro my .Net 2.0 application, how can I add .Net 2.0 framework along with the setup project so that I can Install the application in a machine even though there is no .Net framework installed
|
|
|
|
|
Like this[^].
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi all,
I want to know the better way of filtering Bulk data, pls guide me...
I have two flat files with lakhs of rows having 16 digit numbers.
i want to filter the numbers from first file with second file , resulting in a unique identified numbers.
I am doing it like this.
I am inserting these data into two seperate tables using bulk insert in Mysql.
And then from my web interface iam inputing two flat files, whenever user clicks on filter button
iam querying tables with a select statement using NOT IN sql statement, but it is taking lot of time and even resuling in a connection timeout.
So pls suggest me the best way of doing it.
Thanks in advance.....
|
|
|
|
|
In many cases, "NOT IN" takes a lot of time.
If the table has key column, I suggest following steps.
1. Insert key value, to be filtered, into temporary table.
2. Query with "NOT EXISTS" like "select .. from table where not exists ( select ... temporary_table where table.key = temporary_table.key )"
ToshiyaTSURU <turutosiya@gmail.com>
http://www.google.com/profiles/turutosiya
|
|
|
|
|
Hi,
I have my project in c# and I have its setup project.
To update my existing clients with latest changes, I require to create a Windows Installer Patch.
I could create a patch with MsiMsp.exe, but however my patch does not update the existing application. Changes are not reflected... I would have missed some configuration or set them wrong
Can anyone help to get one by one steps to create a Windows Installer Patch?
Regards,
-SIFAR.
|
|
|
|
|
I want to know how can I make a c# project excutable so the computer does not need the microst visual studio to open it. just a simple .exe file which can run everywhere.
|
|
|
|
|
If you need to run a .Net application(exe file), you do not need Visual Studio. All you need is the .Net Framework. To be sure that the application runs on the computer without .net framework, just ship the framework along with the set up of your application.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Look under Build menu. You can chose Build solution. Or you can go even further. Chose batch build and you can build with and withoud debugging information.
The exe is builded default in [Project Folder]->[Solution Name]->[Project Name]->[Bin] and there you have folders Debug and release.
Not all files are for running.
Ignore every file with:
[ProjectExe].pdb
[ProjectExe].exe.config
[ProjectExe].vshost.exe
[ProjectExe].vshost.exe.config
[ProjectExe].vshost.exe.manifest
|
|
|
|
|
At first I want to say that you do not need Visual Studio installed on the target machine to execute any .exe created with MS .NET, you just need the .NET framework installed in the target machine.
Secondly, I really don't think its possible to build such assembly (.exe or .dll) from .NET, cause it actually breaks the fundamental concept of Microsoft .NET platform.
|
|
|
|
|
Hello, I have problem reaading XML file using XmlReader. Here is a snipset
StringReader sr = new StringReader(SettingFile);
XmlReaderSettings xrs = new XmlReaderSettings();
xrs.IgnoreWhitespace = true;
xrs.IgnoreComments = true;
XmlReader reader = XmlReader.Create(sr, xrs);
while (reader.Read())
{
}
reader.Close();
sr.Close();
That expection is so funny, because the xml is properly used. or shoud i say even it was created by XmlWriter. Here is what it looks like:
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<!--This file have strict case sensative info. Edit at your own risk!-->
<Profiles>
<profile ID="23867ee9a2044c5d899ae654c17e8def" Name="Test" WorkingPath="">
<Plugins />
</profile>
</Profiles>
</Settings>
this is how i saved that xml.
XmlWriterSettings xws = new XmlWriterSettings();
xws.Encoding = Encoding.UTF8;
xws.Indent = true;
XmlWriter xw = XmlWriter.Create(SettingFile, xws);
This line was shown by Total Commander without encoding
<?xml version="1.0" encoding="utf-8"?
So how shoud i solve this problem? I want to use XmlWriter, because it doesn't cache in memory.
Thanks in advance
|
|
|
|
|
I don't think you are supposed to have any characters before the xml version special tag.
|
|
|
|
|
It was created by XmlWriter. Those 3 letters are only poiting that this file was saved with Encoding UTF-8.
Even if i removed them manualy, error still persist
|
|
|
|