Consider the following code:
class Program
{
static void Main(string[] args)
{
try
{
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("fo-FO");
var s = DateTime.MaxValue.ToString("yyyy-MM-ddTHH:mm:ssZ");
var d = DateTime.Parse(s, CultureInfo.InvariantCultu...
Hi,
I have four dropdown lists with same items/values. I want to prevent the same value is chosen more than once when the form is uploaded. How can I do that using a custom validator? Thanks!
...
Hi, I am working on an ASP.Net MVC application which uses the repository pattern with linq to sql as my data source. In my repository I expose the following method:
public IEnumerable<T> Find(Expression<Func<T, bool>> where)
{
return _context.GetTable<T>().Where(where);
}
I am able to call this by saying:
repository<User>.Find(u...
In the .NET fusion logger (FUSLOGVW.exe) what do the two options in the lower right of the screen do?
Log Categories
+ Default
+ Native Images
And how can I use either one to diagnose a mixed-mode assembly problem?
...
I am trying to using the ESENT windows database with the managedesent library but I always get the error
Error FileAccessDenied (JET_errFileAccessDenied, Cannot access file, the file is locked or in use)
The code to open the database is
m_Dictionary = new PersistentDictionary<string, PropertyStruct>("BaseEstateCachedPropertySummary...
In Java, renaming threads is possible. In .NET it is not. This is because the Name is a property that is write-once in the Thread class:
public string Name
{
get
{
return this.m_Name;
}
[HostProtection(SecurityAction.LinkDemand, ExternalThreading=true)]
set
{
lock (this)
{
if (...
I want very specific answer from the developers who did this and want to know how you resolved the problems you faced.
We have very big MFC (VC6) 32 bit application existing for 10 years. Now we would like to migrate it to .NET unmanaged 64-bit application. Here we have some problems, our UI should not change, we may need some managed ...
I am looking for some reliable statistics regarding Java vs. .NET marketshare. I am interested in Java as a platform (application servers etc.) not as a language, so this should include Grails/Groovy, JRuby etc. in Java camp and C#, VB .NET etc. in .NET camp.
...
Hi all,
I have a bindingsource which has been filled out by
tableadapter.fill(DS, param1);
lets say that this bindingsource has :
char num
A 1
B 2
C 3
how do I get num value with given char 'A' using linq?
I could literate using
foreach (DataRowView data in this.p_EM_Select_Event_TypeBindingSource)
but I would li...
I need to display a "busy" indicator in a form while executing a long
running single command (ReadXML or WriteXML). So far, I'm using
Cursor.Current = Cursors.WaitCursor;
but I'm looking for a more adqeuate way to do it. There's no need
to display the percent done, only a visual reference that the program is
working (like a Progress...
Is there an .NET-enabled embedded database (like SQLite.NET) with support for XML?
It doesn't matter for me if it is SQL or NoSQL, XPath, document-oriented or not.
I just know of BerkeleyDB XML, but this project is still alha and seem to be dead for a year.
...
I have a class similar to the following:
public abstract class Manager<T, TInterface> : IManager<T> where TInterface : IRepository<T>
{
protected abstract TInterface Repository { get; }
public virtual List<T> GetAll()
{
return Repository.GetAll();
}
}
This works perfectly fine, however, is there a way to get a...
How can I get all classes inside a namespace?
...
This is what I'm doing:
ssh_ = new Process();
ssh_.StartInfo.FileName = SshProvider;
ssh_.StartInfo.Arguments = "-t -t " + Environment.UserName + "@" + serverName_;
ssh_.StartInfo.UseShellExecute = false;
ssh_.StartInfo.RedirectStandardInput = true;
ssh_.StartInfo.RedirectStandardOutput = true;
ssh_.StartInfo.RedirectStand...
I have a Timespan variable, which has time in local time zone but for a database ( cold type time) I need to pass UTC . How do I do this?
Also I need to get UTC to Local time to populate Timespan variable on pageLoad.
Thanks!!!
...
I am using the standard .NET Settings functionality, which allows be to store settings under the user and application scope.
I have noticed that every time I do an installation of a new build it creates a new folder for the settings and a new settings file.
I have worked out how to use the Upgrade method update the new settings with th...
If we select a large number of rows and use an SqlDataReader, will it return the rows as they come or will it wait until the operation is complete?
This is with C#.net
...
I'm developing a Landscaping application, and I want to create an interface where the user can select different custom objects related to the domain, from a palette, drag & drop them into a canvas and set different properties for them.
I want to set what objects he can choose. Their shape and a different edit form for each of them, depe...
I just installed the latest Silverlight 4 developer bits using the Web Platform Installer. I tried to start a new "Silverlight Business Application" project in VB.NET, but the project won't compile out of the box. For example, I get an error message to replace WebContext with WebClient.
What might be the problem with the Silverlight B...
Is there any registry key which i can look for wcf 4.0
...