My VS.NET 2008 solution is taking longer and longer to compile (ASP.NET 3.5 + ASP.NET MVC 2 + C#) and I am wondering if there is a way to know what project takes the longer to compile and why? I disabled the compilation of a few projects and it helped reduce the build time but I want it faster.
...
I know how I can remove the border of my form, but I simply want to remove the caption. Googling for P/Invokes didn't give me much results, so I'm wondering, how can I achieve such a result?
Exampel: http://localhostr.com/files/d2e951/Captionless.jpg
...
Hello
Highly there is a problem in this lock but i couldn't understand what is that. I have strong suspicious that below example doesn't lock enough well. So what can be problem ?
class example
{
object locker = new object();
void start()
{
for (int i = 0; i < 1000; i++)
{
(new Thread(dostuff)).S...
I was looking for ways to do lazy initialization and found Lazy<T> which is included in .NET 4.
I was thinking of rolling my own implementation of Lazy<T> for .NET 3.5 (with a simpler multi-thread policy), and I bumped into the following problem:
Lazy has basically two types of constructors:
class Lazy<T> {
public Lazy(){...} // ...
I have a detached entity that has a navigation property as such:
public class ClassA
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<ClassB> ClassB
{
get
{
if (_classB == null)
{
var newCollection = new FixupCollection<ClassB>();
...
I have a textbox, a imagebutton and a calendar control inside a user control to pick the date from calendar and set the selected date inside textbox. All work well except the validation. I tried to validate the textbox's value to be a valid date. If it is not valid date, I want to reselect date from calendar. but looks like if valication...
I am writing my own on screen keyboard.
The only piece missing is the position of each key on the keyboard.
Windows allows you to get the keyboard layout:
http://msdn.microsoft.com/en-us/library/ms929433.aspx
But how does one get the position of a key for a given layout?
...
What should be a trival matter has now gobbled up an hour of my time! >__<
I want to start an executable with a xml path as an argument. (I've added the directory in which this program resides to my system path.) Seems simple enough. My first approach was using the static Process.Start() method as such:
Process.Start(@"MyExecutable...
I'm looking for a control or library to capture what an application is showing on screen in particular IE/Firefox.
My app will open an instance of IE to a web page. User does what she needs to do on page then when he clicks button in my app to capture screen of IE/Firefox. My app saves image to db.
I started to write it myself but wi...
I'm using System.IO.Log.LogRecordSequence for logging and I'm running in to a problem when I'm archiving the log.
The log is created as such:
m_oSequence = new LogRecordSequence("log dir path\alex.log"),FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite);
if (0 == m_oSequence.LogStore.Extents.Count)
{
fnAddExtent();
fn...
Why my valication error message disappear after click the submit button outside? Is there any way to keep it after clicked the submit button?
...
Hey folks,
Asp .NET MVC 2 apps started from Visual Studio 2010 are damn in my opinion. It takes 2-5 seconds to refresh or open a new page. Do you have the same problem? Do you know if this ASP .NET MVC 2 debug mode can be somehow sped up?
I work at 64 bit computer, Windows 7 and Visual Studio 2010.
...
Hi
i am just trying to make a simple Ajax call using jQuery
this is my JavaScript:
//Starts the game
function startGame() {
$.ajax({
type: "POST",
url: "Default.aspx/StartGame"
});
}
my button:
<input type="image" value="twist..." src="images/play.png" class="playButto...
The problem is that I have to hit build on my website application multiple times to get all the errors to go away, eventually it will build successfully.
But, i get several messages "label, button, etc does not exist in context". If I click on the file, it corrects itself and disappears. If I click build again it corrects.
I am looking...
I've been looking at the following post and trying to apply it to mine but with no luck:
http://stackoverflow.com/questions/525194/linq-inner-join-vs-left-join
I have the query below that returns 0 records everytime I run it:
var tasks = from tt in d.luProjectTaskTypes
join cbt in d.CostByTasks
...
I have an object which I create from the response from a webservice. If I get a list of these objects, they have a minimal amount of information (in the example below, ID, Prop1 and Prop2 are returned in the list response). If I get the object by ID, the full set of information is returned, including the child objects in Prop3 and Prop4....
How does ASP.NET profiles handle versioning? I know because the data is serialized this could be a problem where with tables it is not.
Will it throw some sort of serialization error?
Example: I store a v1 object to the profiles. I update my web application with a new v2 version but the database still contains v1 objects.
What will ha...
I'm building an app using Windows Azure Table. I've encapsulated all my calls to the Table Service into its own assembly. This assembly uses the .NET 4.0 Framework and includes a reference to System.Data.Service.Client (4.0). I'm able to use this assembly from a test project with no issue.
When I add this project as a reference to an M...
See thread title. Can I safely do something like that without worrying about a NullReferenceException, or is not guaranteed that those boolean expressions will be evaluated left to right?
// can this throw an NRE?
if (obj == null || obj.property == value)
{
// do something
}
...
Is it possible to get the text cursor's position (the X and Y coordinates) within a Word Document (not the mouse cursor)? Basically I need to know where the text cursor is currently located on the screen. Is that even possible?
...