.net

How do I sign a pdf with electronic signature in PDFSharp?

Hello, Is it possible to sign a pdf document with electronic signature in PDFSharp? How to do it? Thanks for your suggestions. ...

SSIS: Curious: why is the last parameter in FireInformation method a ref bool?

I'm currently working on a SSIS package and after the 80th time using FireInformation inside a Script Task, I have to wonder: why would the method require you to pass in a ref boolean as its last parameter? The documentation doesn't state anything about how you should respond to the value once the method returns. Am I missing something h...

dotnet System.Web.Caching.Cache vs System.Runtime.Caching.MemoryCache

I've got a class that needs to store data in a cache. Originally I used it in an asp.net application so I used System.Web.Caching.Cache. Now I need to use it in a Windows Service. Now, as I understand it, I should not use the asp.net cache in a not asp.net application, so I was looking into MemoryCache. The problem is that they are not...

Mapping C data structures and typedefs to .Net

I'm trying to write an interface for communicating with a network protocol, but the IEEE document describes the protocol at the bit level with information split accross a single byte. What would be the best way to go about handling a C typedef such as typedef struct { Nibble transportSpecific; Enumeration4 messageType; UIntege...

TFS: Ignore certain file from pending changes

Hi all, Here is my problem. I have a certain files from the solution (let's say Web.config) that I've changed and will never want to check-in since the changes are referring to my machine only. Is there a way to say in TFS to ignore changes in a certain file and remove it from pending changes window. Of course, I can skip this file in e...

Setting up an elapsed timer event.

Hi, I need to measure the time difference between when the last packet was received and the new one has arrived. I have tried using the Timer class in C# as such: while (listening) { if (hB != null) { interval = hB.GetHBInterval(); aTimer = new System.T...

Software Trial and Obfuscation Mechanisms

I have developed a piece of tool in .NET and now I want to protect it from unauthorized access. I can have a kind of Trial mechanism to give a taste of the software to users but I want them to purchase once after their trial finishes. Now, is there an article that describes how Trial really works? Second point is that Trial can easily b...

HTML Document Viewer with possibility to mark/highlight text in C# / .NET

Our company has a lot of electronic manuals in HTML and PDF file format. We want to create a document viewer in .NET (C#) which works as a library and learning tool: Mark and highlight text: User must be able to select a "Hightlight" Tool in the application to mark text (This will be directly inserted in the source as Text for example...

ADO.Net Transaction Not Working

I have the following code (I'm new to .NET transactions) and it does seem to be executing at all. It's called through a webservice and is difficult for me to debug: public void UpdateJailFiles(List<RMS.NameFile> names, RMS.Incident incident, int currentDate, int currentTime, int incidentKey) { String library = RMSLIBRARY; ...

Javascript Compiler in .Net giving errors

I have the following code: Dim compiler As ICodeCompiler = New Microsoft.JScript.JScriptCodeProvider().CreateCompiler Dim params As New CompilerParameters params.GenerateInMemory = True Dim res As CompilerResults = compiler.CompileAssemblyFromSource(params, TextBox1.Text.Trim) Dim ass As Assembly = res.Compiled...

DataGrid in WPF 3.5

How do I add a Column to a DataGrid in WPF? ...

Is the callBack method called before the assignment or after here?

Hi, I have the code below which is basically calling a Domain Service in a SilverLight Application. LoadOperation<tCity> loadOperation = _dataContext.Load(query,callBack, true); Can you tell me which operation is done first? Is the callBack method called before loadOperation variable is assigned or after it is assigned? Thanks ...

Capture a scrolling window contents screenshot

I need to capture a screenshot of the scrolling window's client area, using .NET. My first priority is capturing web page screenshots. But this can be not the only one use case. For example it can be also a text area in the Notepad. Some applications (FastStone Capture, PicPick) can emulate user behavior to reach hidden part of a scroll...

Bang vs Default Property in Visual Basic

Hello; For a given class, with a default property of list, you can access an instance object in the list by doing myClass.defProperty("key"). You can also achieve the same results by typing myClass.defProperty!Key. I have been told that using the parenthesis and quotes is faster for the way the runtime accesses the Property, but I'd li...

Initialize runtime value-type array with specific value?

Hello, Is there a way I can initialize the following runtime array to all trues without looping over it using a foreach? Here is the declaration: bool[] foo = new bool[someVariable.Count]; Thanks! ...

Can I check if an email address exists using .net?

Ive seen some php examples of how you can ping an inbox(without sending any mail to it) to check whether it exists. I was wondering if anyone knows if this is possible with .net? If it is Im going to write an app to do a bulk check on list of emails i have captured through my site. ...

C# - Outlook 2003: A way to launch address book and select email recipients

My requirement is, From my Win Forms application, I want to launch outlook address book (and/or global address list - exchange server), Choose recipients and then populate a textox with all the email addresses (or) distribution list. Any clues? I searched several forums, but no one addresses this scenario. ...

How will you keep a specific country on top in a drop down list?

In a list of countries that need to be displayed in an alphabetical order, you need to place United States at the top of the list. How will do you this? I answered by saying that I will have a table structure in such a way that the US is at id-0. The rest of the countries are listed in their alphabetical order. So when I fetch from the...

Need a regular expression for detecting simple math expressions..

I'm going to validate simple math expressions such these: a = 1 + 2 b = 2.2 a = b + 5.5 a = b - -5.5 a = -1 + 2 a = -2.4 a = 3.5 / 0.2 + 1 a = 3 * -2.1 NOTE: Operator precedence is not important! I try following expressions but i got nothing!!! for digits: ^([-]|[.]|[-.]|[0-9])[0-9]*[.]*[0-9]+$ for operators: [-]|[+]|[*]|[/] for var...

Install .Net assembly reference in Mono

Hi! I an earlier thread I got some help to track down a deprecated .Net assembly reference and I was successfully able to port my project to build within Visual Studio 2010. Is there any option to get this ReportViewer to work within Mono? Building the project with MonoDevelp 2.2.2 currently gives me similar errors: Assembly "Microsof...