Eventlog.DeleteEventSource SecurityException
We have some logging code (.NET 4.5) that needs to log to the event log for debugging/auditing purposes. The following code blows up with a SecurityException on Windows Server 2012. private void...
View ArticleC# Console Application - Waiting For MsBuild to Complete before moving to...
I am running a console application to (1) checkout code from svn, (2) then run an MSBuild command, and finally (3) search for a dll. (Step 4 is to run a test with a MsTest Command based from that dll,...
View ArticleHow to add stencils in visio file dynamically (C#)
I have One Visio document and one Stencil(.vss) file. Requirement: Add this stencil file inside the Visio document dynamically. private static void InsertStencilsToVisio() { string fileName =...
View ArticleC# Windows Service to Up-date IP Address on remote server
Hi Guys,This may seam a little bit advanced but I am a C# .NET Web Developer and want a services that checks the ip address of a server (or external IP of a router) and then compares it to the one that...
View ArticleDealing with Microphone and Speakers
Hi, I need to make a voice chat using RTP multicast protocol ,So i need a C# dll library that can deal with speakers and microphone to get the user sound and send it over the network. Recommend to be...
View ArticleExcel CopyPicture and asve to Enhanced Metafile
Hi,In excel I select a range and copy it as Picture. I have tried to paste it in Word and it works, but as soon as I want to save it as Enhanced Metafile I always get a null reference.here is my code:...
View Articleneed help reading this image from sql server
Hi,there is an image column on my database (sql server 2008 r2 express). using c# (2005 or 2010) I want to read it, I have followed few code samples to read the image, but somehow the image maybe in a...
View ArticleCalling Fanuc library - wrong type
Hello,I try to call function from a library to get some information about the machine. However I get an exception SystemLoadException: Type IODBPSD_3 from GetAlmMsg, Version=1.0.0.0, Culture=neutral,...
View ArticleListbox AutoScroll
Hi! I have searched google and this site for varius solutions regarding autoscrolling textbox and listbox but I have yet to understand why this code only works in button_Click event:private void...
View Articlehow to get ironpython method parameters using .net
here is my python code:#filename:animal.py __metaclass__=type class Animal(): def __init__(self): self.id=-1 self.name='' def doSomething(self): print 'animal...' def toString(self): print...
View Articlebeginners question time C#
Sorry if this has been posted already but its early morning and i haven't had much sleep...So im new to the application coding but have coded several websites and databases for work not pleasure)i...
View ArticleGeneric classes in C Sahrp
Hi guys, I want know about Generic classes in C Sharp.Can somebody provide me better idea on generic class.I searched many sites,but I didn't get the proper answer. Thanks in advance.
View ArticleReplace user input in Regex expression
Hi FolksI have Decimal Regular expression something llike thisvar regex = new Regex(@"^\d+(\.\d{0,2})?$") with 2 decimal precision.I want to take user input on how many decimal precision they want in...
View ArticleStatic vs Cache
I am hitting database and retrieving data. The data will be changed only on daily basis. I want to store the data in the form of cache.Right now, I am using static class object with dictionary as a...
View ArticleHow to find MAC ID of the device connected to system?
Hi All,I Have connected two antena devices through rs232 cable to my system,now i need to get the device MAC Id of two antena device which is connected to my system through rs232 cable.How do i do...
View ArticleSend email to outlook groups in .net
Hello Folks,My requirement is to send an email to outlook contacts (Manager's and Leads) every Monday morning (say 6AM) and the body content should be coming from SharePoint List. Hence, I created .Net...
View Articledisplay value of session variable in html tabke
Hello,whats the simplest way to get the value of a session variable inside the <TD> of a table. For example:c# Session["MySession"] = 2.01;</script><table><tr><td>...
View Articlewhat is the equivalent method in c# to val() in vb6
Pls anybody help me.I'm converting vb6 code to c#,and i have val(left(something,1)) in vb6and this i want to do in c#, So please help me soon.
View ArticleSendInput to copy/paste doesn't work in a new thread
Hi everyone,I'm actually working on an application sending keystrokes input to any application choosed by the user. On a specific input from the user, sendinput is called to send copy keystrokes to...
View ArticleInterface and Abstraction
Sombody guide me about the abstraction and interface.what is, how to work, diffrence and why we use it.
View Article