I noticed that the C# compiler generates a ret instruction at the end of void methods:
.method private hidebysig static void Main(string[] args) cil managed
{
// method body
L_0030: ret
}
I've written a compiler for .NET and it works regardless if I emit a ret statement or not (I've checked the generated IL and it's indeed n...
I have a form that calls a custom child form. The child form is basically a popup box that gets some user data.
I want the Parent form to process information returned by the Child form.
The problem is, the Parent form is calling the Child, and isn't waiting for a reply.
Ideally, I'd like to make the Child form return a DialogResult. ...
I am tired of flickering of GUI and every possible control, milions of articles about double-buffering, ControlStyle flags and so on that don't even work; look at this examples:
http://stackoverflow.com/questions/1333393/how-to-prevent-a-windows-forms-textbox-from-flickering-on-resize
After reading this question, other on SO, and many ...
Anyone know where I could find sample code for this with system.security.cryptography namespace -- or instructions followable by a developer?
The purpose is to add two-factor authentication to an asp.net website. On website I want to ask user to enter a passcode (similar to if they got it from a keyfob). On the client side I want to pro...
I am using this PictureBox on a form, to this picture box I use the AForge Code. I pass the REFERENCE of the pictureBox into a webcam class I create that initializes the webcam and tells it where to draw its frames to....so it happily draws it frames... no problemo.
But then certain times (when I want to do stuff with said image, if a ...
I have a C# WinForms application that has a WebBrowser control inside of it. I would like to perform two-way communication between my C# form and the JavaScript within the embedded web browser control.
I know I can invoke a JavaScript function with InvokeScript, but how can I invoke C# code from JavaScript in a Document? I guess it wont...
Precondition: There's a web application that leverages ASP.NET security model. There's also an Active Directory (AD) integration component. It provides AD users and roles as if those are application's own users and roles. The relations like "is in role" between AD user and AD role are stored in AD domain, of course, but are cached by the...
I am building a service in Windows Workflow Foundation 4.0 in Visual Studio designer mode.
How do I retrieve client IP and request headers in WF, VS Designer mode?
...
I trying to find the way to implement the full blown SSO using the OpenID so that user does not need to enter anything on the new site within the SSO.
I removed all cookies and started experimenting.
Logged in on stackoverflow.com
Looked at Fiddler and seen that stackauth.com is being contacted
started searching to see what is stackau...
Hi guys, How to determine if a Class in .NET is big or small? Is it measured on how many it's attributes or fields, datatype of its attributes/fields? or return type of methods? parameters of it's methods? access modifier of its methods, virtual methods? thanks..
class A
{
string x { get; set; }
}
class B
{
int x { get; set; }
}...
Testing on local Web Development Server and running the application in shared hosting environment differs a lot.
What are the best steps to deploy a Silverlight RIA Services Application on a shared hosting environment?
...
Hello
I am trying to add a X509Certificate2 to a X509Store using:
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadWrite);
X509Certificate2 certificate = new X509Certificate2();
certificate.Import(
Convert.FromBase64String(strCert),
"",
X509KeyStorageFlags.Per...
Quite often I have unit tests using MSTest for code that is in a GAC deploy assembly. Typically on my development machine I also have a version of code deployed to the GAC. This results in an issue when making changes in the code under test because the unit tests keep running against the GAC deployed assembly.
So, to actually test the ...
I am creating a download manager, and I need to be able to find out what link was clicked on (so my download manager can begin downloading the file), and also need to be able to stop the browser from launching its default download manager.
Does anyone know how to go about doing this, or know of any links to articles/tutorials/related do...
How is the best way to handle any occuring errors in a Sivlerlight application?
I am not talking about error handling in a development environment.
But what would be the best way to log errors and look them up for fute reference?
...
How do I retrieve all filenames matching a pattern in a directory? I tried this but it returns the full path instead of the filename.
Directory.GetFiles (path, "*.txt")
Do I have to manually crop the directory path off of the result? It's easy but maybe there is an even simpler solution :)
...
Hello,
In one of my WinForms applications, I have a window with a ComboBox for the user to select a customer from.
The customers in this list box are in this format : "CustomerID - CustomerName", for example "004540 - NorthWind Traders"
The native WinForms combobox has an autocomplete feature built-in and it works well: the problem i...
Possible Duplicates:
Hidden .NET Base Class Library Classes?
Most useful free .NET libraries?
I just recently learned about AutoMapper which I deeply regret not knowing of sooner.
What other useful (but unfamiliar) dll's are out there to make our lives easier/ our programming more efficient?
Thanks.
Edit: This question wa...
If I want to create .NET app that needs database functionalities, but I do not want to use remote database, what should I use instead?
For example,
1) web app which needs to store data in some kind of database
2) desktop app which need to store data in some kind of database
...
Hi there,
I have a small C# solution used to check users credentials. It works fine for two of my teammates, but on my PC I get an exception.
The relevant code:
PrincipalContext context = new PrincipalContext(ContextType.Domain);
if (context.ValidateCredentials(System.Environment.UserDomainName + "\\" + usr, pwd))
return true;
el...