Click here to Skip to main content
15,891,947 members
Everything / Programming Languages / C# 3.0

C# 3.0

C#3.0

Great Reads

by Jeffrey Walton
Import and export Cryptographic Keys in PKCS#8 and X.509 formats, using Crypto++, C#, and Java.
by Daniel Vaughan
Calcium provides much of what one needs to rapidly build a multifaceted and sophisticated modular application. Includes a host of modules and services, and an infrastructure that is ready to use in your next application.
by Dark Daskin
Article describes how to build an assembly that exposes functions to unmanaged code without C++/CLI
by Sacha Barber
It would probably be like Cinch, an MVVM framework for WPF.

Latest Articles

by Shivprasad koirala
Design Pattern FAQ - Interview Questions (Quick Reference)
by Harsha T, Amarnath S, S Mahesh Reddy
A simple viewer of images stored in the DICOM 3.0 File Format (C#). The file should have raw pixel data, uncompressed. Window Level functionality is also provided.
by AlexeyYakovlev
This paper demonstrates a technique of building Sprache parsers using grammar inheritance.
by Randy Kroeger
This article provides an example on how you can change application configuration settings within an existing ClickOnce publish, update the manifest files, followed by using the Mage utility for updating the manifest using the existing cert file.

All Articles

Sort by Title

C# 3.0 

18 Sep 2011 by ravibulls007
I want to deployment my c#.net project .i want set up that will be created after deployment will installmssql 2005,.net freamwork ,and the server name should be automatically willbe changed on my connection string in my project..So Please Help Me The Step To Do such type of...
18 Sep 2011 by OriginalGriff
You should not include SQL Server in your installation. There are a couple of reasons:0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.1) They may already have SQL Server installed on the network. If so, then they will presumably want to use...
26 May 2010 by Mike Corley
C# (.NET and Mono) library provider for RRDtool
9 Aug 2012 by Kamalkant(kk)
"Collection was modified; enumeration operation may not execute " Why this error is coming when execute my below code:This is my Window Form Application in .Net1.I am using a Global class for reading instance message and shown it to a Textbox2.It is executing fine but some time showing...
9 Aug 2012 by Richard MacCutchan
Your question is a bit of a mess so it is difficult to be certain what is happening and when, but I suspect you are adding or removing an item from your list within the foreach loop. That is what the error message is telling you.
28 Aug 2010 by Clifweb
I wish to create like a sub-folder to the site that each sub-folder represent is checked with the database and if found loads the page "www.codeproject.com/center.aspx?id=test" but with different content.For Example:www.codeproject.com/test...
17 Aug 2010 by Fayu
Look into asp.net routing for webforms:http://www.4guysfromrolla.com/articles/051309-1.aspx
23 Mar 2015 by Oleg Shilo
The extremely simple implementation of generic "Extension Properties"
14 Mar 2013 by Imtiyaz10
I am Imtiyaz Ansari. I have 1 year experience in C# .net. I can't complete my barcode project. So please send me helpful code(link). How to generate barcodes in windows application in crystal report?"
21 Jan 2013 by zqliu
f1(), f2(), f3() is a function of type bool, which of the following style is better? A. if (f1 () && f2 () && f3 ()) do (); B. if (f1 ()) if (f2 ()) if (f3 ()) do ();If three function execution time is longer, is B method is better? Or they are just the same...
21 Jan 2013 by PIEBALDconsult
They should be about the same. I prefer A; it's more polished. Any fool can do B.
21 Jan 2013 by nv3
It actually doesn't matter from a run-time point of view. In other words, A and B will run equally fast. For readability purposes, however, I would always prefer A. or better yetif (f1() && f2() && f3()) doSomething ();
21 Jan 2013 by Abhinav S
I'd prefer A. If (f1 () && f2 () && f3 ()) do (); because it is much more clearer and easier to understand.You are using && which is a short circuit operator.If the first condition fails the second won't execute so there will be no difference in execution time in either case.
21 Jan 2013 by Andreas Gieriet
You left out a 3rd variant:bool hasSomethingToDo = f1() && f2() && f3();if (hasSomethingToDo){ DoSomething();}and a 4th variant:bool hasSomethingToDo = f1() && f2() && f3();if (hasSomethingToDo){ DoSomething();}Usually,...
21 Jan 2013 by H.Brydon
Any C/C++ compiler nowadays will treat both the same way and generate either the same code or almost the same code.A point perhaps more important than performance for this one-liner is maintainability. In most cases, 'A' is the better choice - if the logical tests are truly function names or...
11 May 2011 by siva455
hi ,I have a Datatable which needs to be sorted on header click on column name Min% and I have tried the below code...the datasource for the dgGridview is set earlierprivate int SortOrder=-1;The below code is in dgGridview_ColumnHeaderclick eventDataView dv = new...
11 May 2011 by OriginalGriff
Assuming your code actually works - I haven't checked - then your problem is simple: you are doing something silly, and I don't know why: dcColumn.DataType = System.Type.GetType("System.Decimal"); tem = row[column].ToString().Replace(" ", "%"); row[column] =...
11 Aug 2011 by Member 8081020
I m working on website which sms sending applicationpublic string SendHighPriorityXMLtoValueFirst(long dateTicks, long targetNo, string msgType, string msgHdr, string msgDtls, string from) { try { WebProxy _webProxy = null; ...
11 Aug 2011 by Herman<T>.Instance
some tips: http://www.checkupdown.com/status/E502.html[^]you better talk to some sysadmins since the error is not IN your code but caused by calling external machines. Probably you do not have the rights to connect to that machine
8 Aug 2010 by Eddy Ho 88 from Singapore
Error 1 Unsafe code may only appear if compiling with /unsafe Program.cs 12 28 Project-244public unsafe void Main()
8 Aug 2010 by Sandeep Mewara
Go to your Project properties and under Configuration Properties, Click on build and then change Allow Unsafe Code blocks to true.Well, if needed read more about how to use unsafe here: Using Unsafe Code in C#[^]
9 Jan 2012 by ashriv
Hello Friends, I am trying to develop a web Application with the concept of Aspect Oriented Programming using C#.Net 3.5 . I want to know the better way to Implement it.Shall I use Unity Concept or go with POSTSHARP? which one is better? Thanks.
9 Jan 2012 by Ganesan Senthilvel
Aspect Oriented Programming using Postsharp is more faster than Unity. Postsharp is highly preferable for the various reasons like code enhancement, suitability of large projects, etc.Detailed comparison table is available at: http://www.sharpcrafters.com/postsharp/alternatives[^]
4 Jan 2008 by dmihailescu
Use extension methods to augment the enums to validate the values and more
4 Mar 2013 by Member 9104788
Hi, I am using framework 3.5, is 6.0 and Excel 2003 for my application. I am getting an error message 'Maximum request length exceeded' while I am trying to export data to excel from a data table. I have already given in web.config and I increased the value to 1000000.Still I am getting same...
4 Mar 2013 by Tharaka MTR
Please check followinghttp://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/0da08501-4655-4012-ad0e-60a81ebf55e8[^]
5 Mar 2013 by crazie.coder
Hi...Add this line in your web.config in between tag.I will surely solve your problem.
5 Mar 2013 by crazie.coder
Oh...Sorry due to my typing mistake i missed the linesline is add this in web.config,b/w the tag.
6 Aug 2013 by RSKKUMAR056
Juhi Paunikar Thank you Very Much Its Working for me
20 Apr 2012 by ssnurudeen
the error occur while doing a Windows Mobile application 6.1 on visual studio 2008.net framework 3.5 while creating a proxy class using wsdl The type or namespace name 'SendOrPostCallback' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)But...
20 Apr 2012 by OriginalGriff
It doesn't look like it is supported in Mobile 6.1: just 7.0 under XNA or Silverlight: http://msdn.microsoft.com/en-us/library/system.threading.sendorpostcallback(v=vs.96).aspx[^]
23 Aug 2012 by scoket
I have a console application. Import a Dll to get the monitor status. such as the monitor is off or monitor is on. i use the "protected override void WndProc(ref System.Windows.Forms.Message m)" mothod in the dll project,of course i have to use the "WndProc" method under a winForm....
23 Aug 2012 by Abhinav S
You can look at using WMI[^] contains anything useful for you.
21 Jan 2010 by aasifaslam
hi ,Please can anyone help me ?i m trying to call a function say getdevice();which is present in my unmanaged dll. the function in dll has parameters say getdevice(char **pDeviceList,int *pDeviceCount, unsigned longulFlags)actually i m using c# and doing coding in c# as well and my dll...
21 Jan 2010 by J a a n s
You can call your unmanaged methods using PInvoke. Check the folllowing articles for details.http://msdn.microsoft.com/en-us/library/aa446536.aspx[^]http://msdn.microsoft.com/en-us/magazine/cc164123.aspx[^]
1 Feb 2013 by Yvar Birx
Syntax highlighting has never been so easy!
10 Dec 2008 by Jerry Evans
Improving scrolling performance in Silverlight
17 Dec 2008 by thund3rstruck
Writing and using cross platform AJAX in ASP.NET applications.
4 May 2011 by M.CHAITHANYA
Hi, Can anyone please tell me ,if "+=" operator is overloaded by Microsoft.for eg: delegate double demodel(int a)demodel dd=classname.getsumdoublevale demodel+= classname.getmuldoublevalue ------what exactly happens here? regardsChaithanya M
4 May 2011 by Kim Togo
Look at this great CP article.C# Event Implementation Fundamentals, Best Practices and Conventions[^]
29 May 2011 by Sergey Alexandrovich Kryukov
The question is not so trivial. If you look at the delegate instance dd you will find that this is an instance of some&hellip; class. This class actually encapsulate a lot of functionality. In particular, it has the container of handlers called "invocation list", accessible through...
11 Oct 2007 by aSarafian
An article that tries to clear up the concept of serialization.
27 Mar 2010 by Sergey Sorokin
Use .NET 2.0 configuration features for building a pluggable provider framework for your application.
17 Dec 2007 by Balaji Lakshmanan
Using the Unicode version of CreateFileW, we can overcome the PathTooLongException error on file operations.
8 Sep 2010 by Shivprasad koirala
.NET 4.0 MEF FAQ (Socket, Plug and extension)
22 Apr 2013 by omgade
Hi,i have one problem in .net application.Problem is when i click on any button of form then CPU memory increase.But when i am again click on that button then again increase CPU memory.How can i decrease memory when second time click on button ?Regards,Om.
6 Jan 2014 by Assil
This article describes asynchronous patterns in .NET and how to do them.
16 Aug 2010 by Shivprasad koirala
.NET Best Practice No: 1:- Detecting High Memory consuming functions in .NET code
27 Jul 2012 by itsureshuk
Hi Frnds, I Downloaded Aspx .net Website code in code project...It is in FrameWork4.0 ...But i have 3.5 Framework only...How to convert 4.0 to 3.5 framework run the website...
27 Jul 2012 by Christian Graus
You probably can't load the solution, but you can create a new one and copy the code across. Odds are good it will work, or at least give you errors until you've changed it so it does. Create a new solution. Copy the 4.0 solution to the folder. Add all the files using 'add existing file'. ...
27 Jul 2012 by Mehdi Gholam
Try SharpDevelop http://www.icsharpcode.net/OpenSource/SD/[^], it can convert project types between .net versions.You will probably get a lot of errors downgrading if you are using .net 4 specific features.
11 Mar 2010 by fabianse
Base practice code for those preparing the exam 70-536 or learning the .NET framework basis
27 Aug 2009 by logicchild
An article to help clarify delegates and how to use them asynchronously.
22 May 2009 by logicchild
An article with a focus on object serialization.
10 Sep 2008 by Mayur Chauhan
An UI tool that can be used to zip and unzip a file.
23 Dec 2009 by Sunil Pandita
Generics in .NET explained.
31 Aug 2010 by Livio Francescucci
How to create an ASP.NET gridview AJAX enabled connected with WCF SOAP and REST webservices.
28 Jul 2008 by John Kenedy S.Kom
This project enables developer to create a setup package that automatically installs SQL 2005 Express and restores database to it
14 Dec 2009 by TheCodeKing
An easy-to-use, zero configuration solution to .NET communication across application boundaries. A simple library to use as an alternative to .NET Remoting based on low-level Windows Messaging.
31 Jul 2012 by R. Giskard Reventlov
An impossible question to answer since every interviewer will have a different set of questions to ask. Some may ask few, if any, technical questions preferring to concentrate on finding out how and why you tackle problems and trying to gauge your enthusiasm (very important), whilst others will...
31 Jul 2012 by Monjurul Habib
You will find almost all over here :)I just picked my favorite two links from the above:New Interview Questions for Senior Software Engineers What Great .NET Developers Ought To Know (More .NET Interview Questions)
31 Jul 2012 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Check these out-Asp.net Interview Questions for 2 years or 3 years experience[^].ASP.NET 2.0 Interview Questions - Intermediate Level[^]. Please tell me .Net interview Questions for 2+ Years Exp[^].
31 Jul 2012 by Sandeep Mewara
It depends on individuals who is taking the interview and who is giving it.Their ability, knowledge-base, need/requirement for the position, etc drives it. It's suggestible that you prepare what you have done in last 2 years and go ahead. One need to be a little hands on to be strong on a...
31 Jul 2012 by Sergey Alexandrovich Kryukov
I'm sure that preparing for the interviews is totally useless. Of course, some experience is useful, but you cannot get such experience by "preparation". You real knowledge and experience is important, and if you have it and know your real value, you will behave appropriately. In other words,...
6 Aug 2008 by SHRIDHAR TL
Compose mail messages and send them through your mail account provider.
26 Apr 2010 by Izzet Kerem Kusmezer
With this tool you can download whole .NET Framework source code at once, and enjoy offline browsing. With it, you can have whole the source code without any Visual Studio product installed
2 Dec 2008 by Cirilo Meggiolaro
Multicast delegates provide functionality to execute more than one method.
22 May 2010 by Vinayaka Krishna Shenoy
.Net Performance tip - 2
22 May 2010 by DaveAuld
Here is a better evaluation of performance in .Net of the If / Switch operations;http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx[^]
8 Feb 2008 by Wil Peck
This article provides an implementation of a POP3 MIME client using .NET 2.0 and C#.
24 Aug 2010 by Ramya 2010
Hi,Will you please suggest a good .NET Profiler for the Framework 3.5. And I need the steps for how to check the performance of the application using .NET profiler... I Googled, but I didn't get the exact information.
24 Aug 2010 by Sandeep Mewara
Try this:Visual Studio Team System Profiling Tool[^]Link contains detail about profiling tool with sample tutorial.
24 Aug 2010 by Martin Jarvis
The red-gate profilers are excellent (and they have a free trial!)http://www.red-gate.com/products/dotnet_tools_overview.htm
24 Aug 2010 by Kythen
EQATEC has a very good free profiler for .NET apps. It can also do .NET Compact Framework and Silverlight apps with a paid license.http://www.eqatec.com/Profiler/Home.aspx[^]
24 Aug 2010 by Uwe Keim
We have bought a license of RedGate's ANTS performance and memory Profiler[^].A co-worker also tried JetBrain's dotTrace Profiler[^] (you know the ReSharper[^] guys)CheersUwe
11 Jan 2011 by raj dhakad
how to use user controls in asp.net?
11 Jan 2011 by #realJSOP
google "asp.net user controls".This is the first link out of 3.5 MILLION results returned:http://msdn.microsoft.com/en-us/library/fb3w5b53.aspx[^]
11 Jan 2011 by Kasson
User Control[^]Btw i request you to start reading there are lot of online books also available.As JSOP said first google it, it will give you lot of solutions.
21 Sep 2010 by MatthysDT
O.k, this problem has been very evasive so far so I'm hoping someone here could help me.I have the following code to late bind to a VB6 DLL (via a wrapper created by the Type Library Importer)* Note the following code has been stripped of all error handling etc. for the purpose of this...
21 Sep 2010 by ARopo
do you know which dll/ocx/exe implements the object wr_TCPIP_ASTM.TCPIP_ASTM_CommsClass (27CC4E03-D86D-40B5-96D4-F7EA5B148A0D)?You can find out using regedit - under classes rootHKEY_CLASSES_ROOT find wr_TCPIP_ASTM.TCPIP_ASTM_CommsClassunder wr_TCPIP_ASTM.TCPIP_ASTM_CommsClass should be...
13 Jan 2012 by MatthysDT
Registering the components in a COM+ application in Component Service fixed this.
1 Jan 2008 by malikusman
DCOM component replacement in .NET is .NET remoting
3 Mar 2010 by Ron Beyer
Explains producing and consuming .NET remoting events, the drawbacks, and advantages.
12 Apr 2011 by Ashwani Dhiman
Hi, I have created a Remote Object Class "OCL" to communicate b/w Server & Client.Server Side : HttpChannel myChannel = new HttpChannel(6300); ChannelServices.RegisterChannel(myChannel); RemotingConfiguration.RegisterWellKnownServiceType(typeof(OCL), "OCL",...
12 Apr 2011 by Nish Nishant
When you are invoking methods on a remote object, everything's analogous to how you'd be invoking those methods on a local object. Sending data and receiving data is just a matter of whether you are calling a method that returns data or whether you are calling a method that has parameters...
6 Sep 2011 by SAISAGAR nalla
i cerated a resx file for a form, when i created the setup for the application, i unable to access the resx file. how to do it?
6 Sep 2011 by Prerak Patel
Click the Setup Project in Solution Explorer and then click Add\Project Output\ . From dialog select the project for which you want to include localization (satelite) assemblies and then select Localized resources.After the installation in the folder that I install to, I have the th-TH folder...
13 Jul 2008 by Rajneesh Noonia
The source code / article published here is to provide features of MS Script control (Functions like AddObject) and some features of VSA/Visual Studio editor like intellisence, code completion etc
15 Dec 2008 by David Polomis
Loads a Targa image file into a Bitmap using nothing but .NET code.
5 Jul 2012 by Mario Ghecea
This article describes the technique I used to ingest large text files to create an e-book publishing platform on the Android Market
5 Jul 2010 by asdfr23
how to arrange treeview node dynamically(user end) using C# code
6 Jul 2010 by William Winner
I think you're wanting to allow the user to move treeview items up or down or between levels. Is that correct?If so, you either need to create a set of buttons to do that (a right, left, up, and down button) and enable/disable based on the current selection. Or you need to implement drag...
3 May 2016 by Southmountain
this post discussed .NET versioning and multi-targeting of .NET application and component written in C#.
5 Sep 2011 by gopalomar
Hi all,I need to create a C#.Net web application, which can be run on safari browser(IPad 2)Is it possible?If yes, please guide me to create one.
5 Sep 2011 by Dylan Morley
Yes it's possible, it's just a web application after all - with a few restrictions regarding layout etcHave a read of this aricle [^]
6 Sep 2011 by Al Moje
Hi,I try this if could help:protected void Page_PreRender(object sender, EventArgs e){ HtmlMeta metatag = new HtmlMeta(); metatag.Attributes.Add("http-equiv", "X-UA-Compatible"); metatag.Attributes.Add("content", "ID=EmulateIE7"); metatag.Attributes.Add("content",...
19 Dec 2011 by ahmedfaruk88
Hi Guys, Merry Xmas to you all.I'm currently developing an ASP.NET Application for my company that target a variety of users. After Uploading to our server it displays funny, like placing my login div to the right, but on the development machine it displays fine. After that CSS border-radius...
19 Dec 2011 by Abhinav S
This article[^] discusses layout issues and general compatibility in some detail.This[^] could prove useful as well.This[^] also might be useful.Here[^] is a list of tools that could help you test cross browser compatibility.
19 Dec 2011 by thatraja
Already answered similar questions here before in Q/A section, check it.Browser compatibility[^]
21 Sep 2010 by Mathuraiveeran.P
how to track and drop(move) lable in runtime in .net windows application using c#