|
It was introduced in .NET 2, and people who've used it have noticed some issues with it.
|
|
|
|
|
|
My requirement is to zip the files if i use System.IO.Compression class the files are compressed. again for decompression i have to write a program. I want to use WinZip utility only.
I used the Process.Start as shown below
System.Diagnostics.Process.Start("C:\\Program Files\\WinZip\\winzip32.exe -min -a D:zippy.zip D:\\1.txt");
but i get an error at run time "The system cannot find the file specified"
If i specify only the exe name System.Diagnostics.Process.Start("C:\\Program Files\\WinZip\\winzip32.exe");
then winzip exe is opened. How do i specify the parameters. Please help
|
|
|
|
|
I thought the compression classes used the same algorithm as winzip ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I tried to compress file using GZipStream but when i used WinZip32.exe to unzip the files it dint work. It gave an error message "Cannot open file. it does not appear to be a valid archive"
Does this mean that compressing class GZipStream does not use the same algorithm as Winzip?
If that is the case then i cannot use GZipStream to zip the files. Please let me know if you have any other suggestions. Thanks
|
|
|
|
|
When i was going thro the null types in C# i came across a statement which i had never met in my life
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_csref/html/e473cb01-28ca-42be-9cea-f717055d72c6.htm
THe line is
static void Main()
{
int? num = null;
}
What does the int? mean..
Proud To Be an Indian
|
|
|
|
|
Check this[^]
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
vivekphlp wrote: int? num = null;
The value gives the clue. int? is a shortcut for INullable<int>, which is to say, a wrapper class that wraps an int, or null, which allows you to store null for an int value. You can put the ? after any value type as in double? or Decimal?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks a lot. . .
Proud To Be an Indian
|
|
|
|
|
int? num = null;
The meaning of the int? is represent the num is nothing there no mermory alocatin for the num the space of the num is empty.It is mainy used for DATA Base activity.
Continue...
|
|
|
|
|
This is not true at all. The memory is allocated, and the memory for the wrapper generic class that int? is a shortcut to, is also allocated. It's simply set up so that the initial value is null, which means that whatever value the int has ( an int cannot be null ), the wrapper class will not expose it, because it regards the value to be null intead.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: The memory is allocated, and the memory for the wrapper generic class that int? is a shortcut to, is also allocated
SO you mean to say when we write
int?num; // allocates 4 bytes of memory but requires an initial assignment.
But "int?" is a "SHORTCUT to WHAT ???" is it System.Nullable<int> variable
Proud To Be an Indian
modified on Tuesday, April 8, 2008 4:32 AM
|
|
|
|
|
vivekphlp wrote: But Graus "int?" is a "SHORTCUT to WHAT ???" is it System.Nullable<int> variable
Yes.
BTW, referring to people by their surname is considered rude in the West. Just saying....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sorry If i had hurted U. . .
Proud To Be an Indian
|
|
|
|
|
Not at all, like I said I'm just saying. I understand that it's just a cultural difference between our countries, but, I thought it worth pointing out, because someone else might be offended.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to create a scheduled service application in C# which runs after some period of time..
Basically it should be any program which executes and then sleeps and then again wakes up and executes after period of time..
Can anyone guide me over this?
Som
|
|
|
|
|
Hope this helps[^]
better one[^]
Until you realize this message has nothing to say, its too late to stop reading
modified on Tuesday, April 8, 2008 1:09 AM
|
|
|
|
|
I think I didnt write my post properly..
I dont want to make a windows service.. Since that would be too high on performance.. I want to make a kind of windows scheduler which executes some other program at specified intervals of time (say once in every 3 hours or once weekly)..
I know this may be achieved by adding a task to windows scheduler..
So how can I add a task to the windows scheduler programaticaly using C# so that it may run at specified intervals of time??
Any help would be appreciated..
Som
|
|
|
|
|
The service applicaion will help you create the scheduled applicaion.
First create service applicaiton. This appliciaon relate with your applciaon.Then you can solve the probelm.
Continue...
|
|
|
|
|
C#, How to check an object to see if it is a numeric value?
something like this?
if (IsNumeric(intnumber))
{
return intnumber
}
else
{
return 0
}
|
|
|
|
|
int iValue<br />
bool isInteger = int.tryparse(yourObject, out iValue);
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
Can we put it an if statement?
If (isNumeric(myObject)
{
return myObject
}
|
|
|
|
|
dougins wrote: If (isNumeric(myObject)
Where did isNumeric came from?
If you are talking about Microsoft.VisualBasic.Information.IsNumeric(object) then cant use it.
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
The only place that IsNumeric exists, is for a char. The TryParse methods take a string, so if you have an object, you need this:
string testVal = myObject.ToString();
double d;
if (double.TryParse(testVal, out d))
{
// I used double because 23234.545 is a number and int.TryParse won't accept it
// I assume double.TryParse can parse a whole number.
}
The other way to do it is
bool isNumeric = true;
foreach(char c in myObject.ToString())
{
if (!char.IsNumber(c))
{
isNumeric = false;
break;
}
}
But this is more code, and again, it depends on if you care about decimals, writing a method to check decimals is even more messy ( you must accept one and only one decimal, and you need to respect culture, some cultures use , as a decimal point.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
object obj = 10;
string str =Convert.ToString(obj);
Console.WriteLine(char.IsNumber(str, 0));
Console.Read();
Hi friend u can use this functionality and solve the issue.
Continue...
|
|
|
|