I am trying to come up with the best way to get only certain properties from a type using reflection. How can I differentiate the properties from each other?
Let me add this to help clarify my question.
I understand that I can use binding flags or name. But say I want only a certain four properties. Would the best way be to create a...
I have a DataGridView with a DataTable set to its DataSource. The DataTable has two columns. The user has a TextBox which dynamically (after each keypress) searches for a match in the first column.
I want to jump to the matching record (if any) after each key entry, so it needs to be fast.
I use the Find() method on the DefaultView of ...
Hello, I am new to .NET and have heard about several different ways of querying a SQL Server databse such as ADO.NET and the entity framework.
Can anyone give me some advise about the best way to go for new applications?
Thanks for any help or suggestions.
...
I am populating an XML structure (using VB.NET) to pass to a web service. Here is how one piece of the structure is filled, and the rest of the structure is filled in a similar manner:
Private Shared Function GetSpecialties(ByVal specialties As System.Data.Linq.EntitySet(Of Provider.provider_specialty)) As XElement
Return _
...
I have no experience building a .NET desktop application, all my experience is with the web. A friend of mine has asked me to do a quick estimate for a small desktop application.
The application just displays a list of items from the database. When rows are deleted/added from the database, they need to be deleted/added from the list on ...
I am reading IPaddress from xml file and I put it into IPaddress.parse() and then use it but it does not work. it says "An invalid IP address was specified." but when I write it manually it works.
why I cant use IP address after reading xml file. I tried to erase "white spaces" , it said samething again.
string ipadd; //take ip addre...
I have a C++ ATL COM component that displays a popup window (plain ol' Win32, using the WS_POPUP style) which allows the user to input some search information. This component has been tested pretty extensively against a VB6 form (primarily for ease of debugging), but we want to use it with .NET winforms.
The curious thing that we found...
Possible Duplicate:
Why does WPF support binding to properties of an object, but not fields?
It appears that in WPF I cannot bind to a public field on an object, but only to public properties. Is this an intentional design decision on the part of WPF, or am I just getting the syntax wrong?
Here's a sample snippet:
public ...
I am investigating the possibility of treating a video input/output card as a Window so that I can render graphics to it from .NET. It would need the ability to handle transparency so that I can key the rendered graphics over incoming video.
I haven't found anything that does exactly this - some SDKs allow you to render graphics, but yo...
I want to make a single event that will capture every change in the data in a DataGridView. The list of events is pretty long. I was thinking I could bind the DataGridView to a DataTable since it has less events and it gets notified whenever the user changes the data in the DataGridView. Since the amount of data is tiny (2 columns and ab...
At my work, we are developing different applications using .net framework 4. All the applications use common assemblies that we developed, for example the data layer in data.dll. These applications reside on a network drive and are launched directly from there.
Most big applications take a while, like maybe 4-5 seconds, to launch the fi...
What is the best practice for developing a shared class library in Visual Studio 2010 to be used by a .NET 3.5 app and a 4.0 app?
I could do it with separate project/solution files, one for 3.5 and one for 4.0 i.e. MyProject.3.5.csproj and MyProject.4.0.csproj but then I need to keep the files in sync. Is there a better way?
...
Hi,
Where can I find information or how can I handle SQL Server transactions in a BackgroundWorker thread? It's my understanding that error handling should not be set in the "DoWork" event and that the error is handled internally and passed to the 'RunWorkerCompleted".
I am currently using SubSonic as my DAL and passing some lengthy ins...
Gojko Adzic posted today on his blog about Steve Freeman's unit-testing trick, which helped make it crystal clear why the date comparison in the unit test failed. Here is the blog post describing the trick - it is not long.
The key part of the trick is this method (in Java), which overrides ToString() on a particular instance of the Da...
I am dealing with running a control in a form, however the form itself is of no value to me. I essentially want the form to run a task and return a value, however for that I'd like to use something like an AutoResetEvent to return from the function call only when it has completed, which obviously would block the forms thread and make it ...
We are looking into upgrading our asp.net 2.0 application to run on the 4.0 framework. We currently use system.web.extensions 1.0 and AjaxControlToolkit 1.0.
We made modifications to the toolkit and so we haven't upgraded it since. When I upgrade our solution and dependent projects to 4.0 I get the "sys is not defined" error which t...
Hi,
I am trying to read the XML Documentation file (C#) using this ocde -
Type classType = typeof(Point);
string documentationFileLocation = classType.Assembly.CodeBase;
if ( !string.IsNullOrEmpty(documentationFileLocation) && documentationFileLocation.StartsWith("file:///") )
{
documenta...
I'm trying to use Microsoft.Office.Interop.Excel. It seems to load fine but when I try to use it, all the defaults parameters are not working. Here is a screenshot that shows all those bad values
Whenever I try to ommit them, the compiler tells me that the function needs more than 1 parameter.
This function is Open as in :
Micros...
I've been using DevExpress and CrystalReports for previous .NET versions. I'm wondering if there are any native reporting controls for .NET 4.0, so I could do away with the 3rd party ones.
...
Hi! I'm using Microsoft Visual Studio 2010. I start to work with FluentNHibernate 1.1. After configuration.BuildSessionFactory() execute, i have exception.
Message "Could not load file or assembly 'Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies.
Castle.DynamicProxy...