Ok, I just don't get it.
I've read about as much as I can on the subject without knowing what it's all about:
Why use Expression Trees?
What's a real-world example of when and how I'd use them?
What overall benefit(s) are there in using them?
...
I have a desktop app that I'm making and I want users to have to login before the program can be used to its fullest extent. I have created a database on www.winhost.com (where my site's hosted), but now I don't know what to do. I've been on google and msdn and I would like to know how to programmatically add new rows/colums to this new ...
Suppose I have two tables, TableA and TableB. Each record in A has one or more related records in B. Say I want a reusable filter using predicates. I might do something like this (Linq-to-SQL by the way):
private Expression<Func<ARecord, bool>> FilterPredicate()
{
return x => x.Name == "Test";
}
private IQueryable<ARecord> GetRecor...
While working with WinAPI, I decided to implement a call to GetProcessAfinityMask in my C# application. However, I've seen two different signatures for this function.
One of them uses SafeProcessHandle for the handle:
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool GetProcessAffinityMask(...
I would like to connect to a DB2 database, specifically an iSeries version, using .Net and C# by referencing a .dll and NOT installing any software on the server. Currently we use the IBM.Data.DB2.iSeries.dll, which is installed as part of iSeries access for windows. I don't want to have to install all of that. But apparently I don't hav...
I would like to restrict what they see in the file upload dialog, which is set to "All Files" by default. I understand how to validate that they only uploaded a certain file type, that is not the question here. I would just like to know how to default the file type in the file selection dialog.
Is there any way to change this to "PNG on...
ok heres the deal, im grabbing all the methods from a webservice and providing a way to test them. so far we are displaying their methods and some of the methods only deal with ints and strings. that part is taken care of. (we can invoke methods correctly and parse results)
the problem is that some of these parameters needed for the met...
Background:
I have a set-up where I have two .csproj in a solution that use different reference .dlls. Both projects are directed toward the same source code. To avoid any segments of code where methods have changed, I created a custom configuration (in addition to the default Debug and Release configurations) and swapped between code ...
What I'm trying to do is take an RSS feel URL and, using LINQ, be able to write a query that will let me sort the subject line of the feed or sort the author line of the feed or even do 'WHERE' clauses that will let me filter by keywords for example.
I know I can read the RSS feed, parse each element, put them into some sort of class ob...
I have an Excel 2003 "application" that at this time the users refuse to part with. I am updating it to use a .NET class library for some of the calculation, to try to minimize the risk of using excel. This .NET Class Library calls a .NET WCF Web Service.
When trying to call a function that utilizes the web service, the class library th...
I have an RTF File as an embdded resource in the assembly.
What is the easiest way to Print that file ?
...
I was recently asked a weird question in an interview here it is;
Private Function sorttable (ByVal dt As DataTable, ByVal sorttype$, ByVal sort_direction$) As DataTable
Dim dv As DataView
Dim dt2 As DataTable
dt2 = dt.Clone
dt2.Merge(dt)
dv = dt2.DefaultView
dv.Sort = so...
Hi All,
I see a very good post here about what I am wanting to do,
http://stackoverflow.com/questions/1831291/net-3-5-to-read-connectionstring-from-app-config
It says to use the ConfigurationManager class. I cannot reference the ConfigurationManager class.
If I look at the system.dll that I am using (which is v2.0.50727) there is no ...
I keep getting this error when trying to perform a delete in the middle of my DataReader:
System.InvalidOperationException: The context connection is already in use.
I get all the rows that need to be deleted and then iterate through the data reader as there are a lot of rows returned.
SqlConnection conn = new SqlConnection("context c...
This is the code I'm trying to develop:
Public Structure Statistic(Of t)
Dim maxStat As t
Dim curStat As t
Public Sub New(ByVal pValue As t)
maxStat = pValue
curStat = pValue
End Sub
Public Property Level() As t
Get
Return curStat
...
I have a large acceptance test suite that runs the source application many thousands of times, creating an NCOVER report for each run. After each test, it merges the generated code coverage report into a large "master" coverage report for the whole application.
My worry here is that I'm running into a Shlemiel the Painter problem, as th...
I am working on with .net 2.0 compact framework on a pocket pc device and the camera doesn't automatically tag the image with GPS exif data (unlike iPhone).
I have looked around for already existing open source libraries that i can use in order to write GPS Exif data to a JPEG image but i haven't come across much. I did find a few examp...
Let's say I have these kind of requirements:
User A in Role AA needs to be able to update all entities of type A1.
User B in Role BB needs to be able to update only the entities of type A1 with the primary identifier of "2", which I'll call A1("2"), and can not update any other entities of type A1, but can add or delete any number of c...
Hello,
I am currently working on 2 .NET apps which must communicate with each other. Simple Windows Messaging was chosen and this works nicely at the moment.
The data that is sent in the messages is a simple string, but now I have created a message class which contains a command (enum) and a data (string) member, and later possible othe...
What is the proportion of .NET developers who do WinForms/desktop development vs ASP.NET development? Is there very much overlap? Are they very different skill-sets?
...