I want to compress an entire directory which can have any number of subdirectories into a single ZIP file.
I am able to compress a single file into a zip file programmatically.
To compress an entire directory, i can think of a recursive program that walks through each subdirectory and compresses it.
But Is there any simple way to comp...
I am developing windows Forms application, for this i am using SmartClient. Here i click workspace close('X') event at the time i want to display messageBox based on user input (OK/Cancel) i have to decide pane has to be close or not.
...
Hi there,
I'm considering writing a custom IPermission implementation but am not clear as to how it should work. I've already implemented IPrincipal and IIdentity. What I would like to accomplish is to be able to check permissions vis a vis the current IPrincipal's authorizations rather than its roles. Generally, authorizations are read...
Is there any way to change the name of a dynamic assembly after it has been created? I'm using a framework that uses dynamic methods, and it is creating a dynamic assembly with the same name as my main assembly (which causes problems with WPF when it tries to load resources). So I need to find a workaround, and I thought of trying to cha...
I've got exception about convert NULL to Int32.
I've got a table from database with nullable tinyint
[Column(Storage="_StatType", DbType="tinyint NULL")]
public StatType : int { get { _StatType; } }
(to get C# code just replace variable's type)
and after making linq select
def StartLinq = linq <#from lpi in _CfgListParIzm
whe...
I need to implement "Drag and Drop" operations for the ToolStripMenuItems.
Everything works fine only with ToolStripMenuItems on the first level. I mean I can't move menu item from a submenu to other one. But I can move submenu to top-level menu. I noticed that DragEnter event isn't rised for submenus. Initialization is the same for all...
I've added as wsdl file using the add servece reference dialog in vs2008.
MyService serviceproxy = new MyService();
When I instantiate the service proxy, I get an InvalidOperationException with the following text (translated from german):
Could not find default endpoint
element to the contract
"ServiceName.ServiceInterface" in...
I'm trying to connect to a AS400 server using the .net classes.
I have added a reference to IBM.Data.DB.iSeries and I use the following code:
var conn = new iDB2Connection("DataSource=111.111.111.111;UserID=xxx;Password=xxx; DataCompression=True;");
conn.Open();
But I get the following exceptions
Running 64 bit: "The provid...
Hello,
I am using .NET to draw a string into a limited space. I want the string to be as big as possible. I have no problem in the string breaking up into more lines (if it stays inside the rectangle). Now the problem: I don't want .NET to break the string in different lines in the middle of a word.
For example string "Test" prints on a...
Is there any way from that, we can get live feeds or notification from customers (price updates, product changes) into my outlook, and by click on that my message will pass to them that I am agree with it.
...
Example for threading queue book "Accelerated C# 2008" (CrudeThreadPool class) not work correctly. If I insert long job in WorkFunction() on 2-processor machine executing for next task don't run before first is over. How to solve this problem? I want to load the processor to 100 percent
public class CrudeThreadPool
{
static readonl...
Hi!
I need to count number of repeating and position where they repeat of all number in multidimensional array like this:
1 2 1
1 1 2
2 3 1
And result need to be:
Number 1- two times on position 1, one time on position 2, two times on position 3
Number 2- one time on position 1, two times on position 2, one times on position 3
Nu...
Hello Stackers
Does anyone have an idea on how to include or input the page numbers in the excel sheet generated using C# code.
I use the libraries available in Microsoft.Office.Interop.Excel to generate the file.
However by default in the output i cannot see the page numbers. I know to enable this via
excel options (View --> Header...
base class:
Class List(Of T)
Function Contains(ByVal value As T) As Boolean
derived class:
Class Bar : List(Of Exception) ' Exception type as example '
Function Contains(Of U)(ByVal value As U) As Boolean
compiler tells me that that two are the same, so I need to declare Overloads/new this second function.
But I want use U...
We have a C# project which for historical reasons uses both Doxygen and Visual Studio style comments in the same code.
Has anyone tried to systematically translate one standard to another, preferably to the common XML subset?
I guess it would not be too difficult to write a script to cover the most common features,
but I would not like...
Hi All,
I am wondering on where to begin to perform the following replace in regex:
Read file (.cs file)
Replace anything between quotations ("e.g:") with its uppercase version ("E.G:")
By example:
string m = "stringishere";
Becomes
string m = "STRINGISHERE";
Thanks in advance,
Kyle
...
I need to round-off the hours based on the minutes in a DateTime variable. The condition is: if minutes are less than 30, then minutes must be set to zero and no changes to hours, else if minutes >=30, then hours must be set to hours+1 and minutes are again set to zero. Seconds are ignored.
example:
11/08/2008 04:30:49 should become 11/...
How can I set a proxy for a Webbrowser Control without setting a proxy for IE?
Basically I want my application to use a certain proxy however obviously I don't want to change user's IE proxy settings.
...
I have a Logic layer that references Silverlight's System.Xml.Linq dll and a GUI that is in WPF (hence using the non-Silverlight System.Xml.Linq dll). When I attempt to pass an XElement from GUI project to a method in the Logic project, I am getting (basically) "XElement is not of type XElement" errors. To complicate matter, I am unable ...
Hi 2 all,
I set up Open-xchage(wrote on Java) on openSUSE and installed SOAP extension on it. Then i tried to generate web referense in vs2008, but it doesn't work. Can I generate WebReferense of Java-based service and use it in .net/c# ? Any ideas.
Thanks.
...