blah blah blah is here! blah blah » Close

0
votes
1 answers

Creating a ToString() or Hash type output for a class

When I cache objects to Context.Cache I usually build the cache key using the parameters of the method that retrieves the data using the database layer. Now sometimes a parameter isn't a simple type like a string or int or enumeration, b ...

0
votes
1 answers

Is there a way to see the command-line arguements used by vs.net during a compile?

I want to see exactly what vs.net does behind the scenes when it compiles a asp.net web application. [code]csc.exe etc etc.[/code] Is this possible? I find that the IDE abstracts so many things away from us, we have no idea how to ...

1
votes
1 answers

How can I sort a Dictionary<int, User> collection by a property in the class

I have a collection of type: [code]Dictionary<int, User>[/code] And I want to sort by alphabetically ordering by the 'Name' property of the User object. How can I do this?

1
votes
1 answers

How to perform a lock programatically?

I need to make a API call, but I want to wrap the call in a (C#) lock. What options do I have to wrap some logic in a lock to make it thread safe? Is it possible to mark a particular class or method as serializable also?

0
votes
0 answers

How to build Html helpers for asp.net mvc?

Is there any official documentation on best-practices on how to create reusable html helpers with ASP.NET MVC? I need these helpers to do things like: Display a boolean value that I get from the database and display it as a simple dro ...

0
votes
2 answers

are both java and c# date types objects under the covers?

Are both java and C# date types (built in types) all objects? like integers, boolean, double, etc.

0
votes
1 answers

How do I load an image into the System.Drawing.Image class?

How do I load an image from a file, into an instance of the System.Drawing.Image class?

0
votes
1 answers

How can I push a file to a remote FTP server?

I have the credentials/ip address for the remote FTP server, and I want to upload a file to the server in a asp.net web application. How can I do this?

1
votes
2 answers

See if any files were added/deleted to a directory, want to create a hash

Say I have a folder: [code] d:\ftp\ [/code] I want to figure out if any files were added/deleted to the folder. I figured created a SHA1 hash would be a good route to take, since from what I understand it will create a 40 character ...

0
votes
0 answers

Are there books that cover SOA architecture for .net developers?

I want to learn SOA architecture (Service-oriented architecture) as a .net developer. Is there a book that covers these sort of topics that you guys can recommend?

0
votes
1 answers

Multiplying 2 decimal varialbes together

I am multiplying to decimal type variables together, do I have to cast or use any special symbols to ensure the output will also be a decimal value? I know I have to add the suffix m or M. e.g.: [code] decimal v1 = 234M; [/code ...

0
votes
1 answers

Linq query doesn't seem to compile: "could not find implementation of the query pattern..."

Trying to compile a linq query, which is basically the same as I did in another library so the code should compile. The error is: Could not find an implementation of the query pattern for source type 'System.Collections.Generic.IEnu ...

1
votes
1 answers

When to use exceptions properly

Are there any clear guidelines of when to use exceptions, and when to simply pass a boolean that signifies if the resulting method suceeded in its operation or not? Some people tend to throw exceptions, and then catch them in the calling ...

0
votes
0 answers

when do you use a ISet and IList in nhibernate mapping collections?

I am a little confused, just looking at some sample code I noticed at times they use ISet<Entity> and other times I see IList<Entity>. What is the difference between the two collection types in nhibernate?

1
votes
1 answers

Reseeding a table in sql server with the identity value of 2

I want to purge all rows in a table except for the row with ID = 1. I then want to reseed the table so that the next row that is inserted will have the ID value of 2. I remember that you can reseed the identity column, how can I do th ...

Feedback