I have a .NET MVC winform app. I've created an AppDelegate class that handles application startup and shutdown...for now (it might do more later). Winform apps have a Program.cs file that does some app initialization, starts the message pump and creates the first form. In my app, the first form is AppDelegate, which isn't really a form but is…
Does C# allows partial interface? i.e., in ManagerFactory1.cs class, I have
public partial interface IManagerFactory
{
// Get Methods
ITescoManager GetTescoManager();
ITescoManager GetTescoManager(INHibernateSession session);
}
and in ManagerFactory.cs class, I have:
public partial interface IManagerFactory
{
// Get Methods
…
Hi,
I've just started a new project in ASP.net 4.0 with MVC 2.
What I need to be able to do is have a custom hook at the start and end of each action of the controller.
e.g.
public void Index() {
*** call to the start custom hook to externalfile.cs (is empty so does nothing)
ViewData["welcomeMessage"] = "Hello…
I always seem to encounter this dilemma when writing low level code for MCU's.
I never know where to declare pin definitions so as to make the code as reusable as possible.
In this case Im writing a driver to interface an 8051 to a MCP4922 12bit serial DAC.
Im unsure how/where I should declare the pin definitions for The…
Hi all,
I recently created a (C#) project with Visual Studio (2010) and used some Settings (which I created under Properties).
The only place I found where I can add some XML comments for my documentation, would be in Settings.Designer.cs.
However this file is auto-generated so whenever I change the Settings, the comments…
I am working on a project where we have several attributes in AssemblyInfo.cs, that are being multicast to a methods of a particular class.
[assembly: Repeatable(
AspectPriority = 2,
AttributeTargetAssemblies = "MyNamespace",
AttributeTargetTypes = "MyNamespace.MyClass",
AttributeTargetMemberAttributes =…
I am using Hg to manage and merge code with three other developers involved in a VS2008 project. We do have an .hgignore file that ignores a fair number of files not necessary to track, such as *.pdb, *.obj, etc. However, we do track .csproj files.
Periodically, it would seem that files go missing after…
Hi, im brand spanking new to WCF and Im trying to understand how to correctly expose my BLL to it.
I created my first Resource.svc and IResource.svc
Resource.svc
[ServiceBehavior]
public class Resources : IResources
{
#region IResources Members
public List<Model.Resource>…
Hi I am trying to get a website running with Mosso that has Castle Windsor as my IOC, however I am getting the following error.
[SecurityException: That assembly does not allow partially trusted callers.]
GoldMine.WindsorControllerFactory..ctor() in WindsorControllerFactory.cs:33
…
I need to call a plugin inside a ajax call so it could be used on called&received data.
But I got the following error.
Error: CategoryName.find is not a function
Source File: http://www.refinethetaste.com/FLPM/
Line: 82
I tried it as:
$.ajax({
dataType: "xml",
…
"Collection was modified; enumeration operation may not execute." appears to be a common error with foreach loops, but I can't figure mine out. I have two classes of forms. One is begun on startup, and a button creates new instances of the second form, and displays them. When I close…
Hi all.
I'm quite new in programming .I wrote the below code in order to prompt the user for a password to encrypting a file, But it just work when the length of password is 8, What can I do on order to accepting any number of characters for the password?
string pass =…
I'm trying to display an image on a splash screen and it's being stretched upon display. The image I'm trying to display is a simple bmp file. Any ideas why?
In SplashWindow.xaml:
<Window ... SizeToContent="WidthAndHeight">
<Grid>
...
<Image…
I am getting some "ref" vs "out" keyword errors using the sql-net and C# Sqlite combination for windows phone 7.1. Is this due to a wrong combination of libraries that I am using?
App Type: Windows Phone 7.1
Using:
1) sql-net Version 1.0.5, Source Nuget thru Visual…
I trying to open C: directly with FileStream without success:
new FileStream("C:", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
System.UnauthorizedAccessException was unhandled
Message="Access to the path 'C:\' is denied."
Source="mscorlib"
…
I have a very simple XAML form, that has one namespace definition. For some reason, when Visual Studio processes that XAML file in to it's component .g.cs, it's sticking a bunch of namespace definitions at the top that I have not asked for in the XAML, or the code…
Hi guys, I'm student here, new to python and programming in general.
I have a dictionary links which holds a tuple mapped to a number. How can I join the second url in the second tuple together with the urljoin() function? What I'm trying to do is get complete…
I am having difficulty in reading data from my SQLite database from MonoTouch.
I can read and write without any difficulty for the first few screens and then suddenly I am unable to create any further connections with the error:
…
In a Visual Studio website, I have created a user control. This control is derived from a class (in App_Code) that is itself derived from System.Web.UI.UserControl. This is an abstract class with an abstract method. I then try…
I am relatively new to programming (around 1 year programming C#-winforms). Also, I come from a non CS background (no formal degree)
Recently, while being interviewed for a job, I was asked about implementing a queue using a…
I am trying to get list of reviews for specific changeset using FishEye REST API.
Here is my URL:
http://fisheye.company.com/rest-service-fe/search-v1/reviewsForChangesets/NameOfRepository/
I am posting it using fiddler…
I've been writing an endpoint that sends events to a KRL ruleset via HTTP GET (based on the documentation here), in this format:
http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid}
That works great when the…
We're uploading files to a temporary folder in a bucket. After that, we're trying to copy the uploaded files to its actual folder then delete the files in the temporary folder. It doesn't timeout when working with…
I'm running this out of the VS 2008 debugger on Windows 7, running .Net 3.5.
The idea was to make all ajax requests with jQuery only, rather than .net, following some tutorials online.
Default.aspx - HTML page,…