I have a class that has a few arraylists in it.
My main class creates a new instance of this class. My main class has at least 2 threads adding and removing from my class with the arraylists in it. At the moment everything is running fine but I was just wondering if it would be safer to declare my class with the arraylists in it as vol...
try
{
String endPointAddr = "net.tcp://localhost:8000/MyService";
NetTcpBinding tcpBinding = new NetTcpBinding();
tcpBinding.TransactionFlow = false;
tcpBinding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
...
How can I prevent the user from entering anything but alpha characters in my textbox?
Update
Forgot to mention that its a dynmic control (created on the form when the user clicks a button).
...
I know this is a basic question, but I'm having a bit of trouble understanding how to do this properly.
Given the following XAML:
<Button>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid...
I am writing an error log procedure (for security reasons I cannot use log4net / elmah etc), and I wanted to know if it is possible to get the line number of the line where the error occured and / or the procedure name where the error occured?
I will be creating try catch finally statement blocks, so I am hoping to get the line number of...
There are not very many options for a virtualizing wrap panel for use in WPF. For one reason or another MS decided to not ship one in the standard library.
If anyone could be so bold as to provide a crowd source answer (and explaination) to the first work item on the following codeplex project, I would greatly appreciate it:
http://vi...
I need to develop an application where two csv files are compared. The first file has a list of email addresses. The second list also has email addresses, but includes name and address info. The first list contains email addresses that need to be removed from the second list. I have the Fast CSV reader from the CodeProject site which wor...
I'm developing a stocks evolution chart with Microsoft Chart Controls and I need to show the initial and final dates on the AxisX labels but I can't do it.
I google and found many solutions like set the properties:
Chart1.ChartAreas[0].AxisX.Minimum = InitialDate.ToOADate();
Chart1.ChartAreas[0].AxisX.Maximum = FinalDate.ToOADate();
C...
How do you query a List<string[]> to get the index of the arrays having matches on their sub-arrays and get a return of type System.Collections.Generic.IEnumerable<string[]> ?
EDIT:
I have this:
string[] report = File.ReadAllLines(@".\REPORT.TXT").AsQueryable().Where(s
=> s.StartsWith(".|")).ToArray();
List<string...
How we use CallBack in WCF fluently with events and delegates?
If Client give any request or any conditions matches of client then services automatically fire the event which condition or request given from client.
how is it possible?
...
Hey all!
The following code worked previous to the Vs2010 upgrade...
using System.Data.Services;
namespace Nla.Dashboard.Web.Services
{
public class DashboardDataService : DataService<NlaPrimaryEntities>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceCo...
I am new to .net and wanted to know how to activate stack tracing in .net?
...
Hi,
I need to migrate a ASP.NET application from 1.1 to 3.5. I have gone through the answers on this forum already, but still have some questions
should I convert the application from 1.1 to 3.5 directly? OR convert it to 2.0 first and then to 3.5 and the reasons for doing so.
Is there any article that walks through the whole convers...
how to use hovermenuextender in asp.net 3.5 vs 2008
...
I have the following code where I am handling an event twice. However I always want to ensure that mynewclass always handles the event first and then the local event handler code fires. I understand the MyClass event should fire first as that is the one created first but because the thread and enqueuing is taking place, I think its tak...
Hi,
Is there a way to create a Generic Method that uses the new() Constraint and only accepts constructors of a given type?
Example:
I have the following code:
public T MyGenericMethod<T>(MyClass c) where T : class
{
if (typeof(T).GetConstructor(new Type[] { typeof(MyClass) }) == null)
{
throw new ArgumentException("I...
I have created a generic method that enables clients to specify both the concrete type of the returned instance and the actual returned type (e.g. an interface) as independent type parameters. Naturally, the concrete returned instance type parameter is constrained to inherit from the actual returned type.
The idea is that you may return...
I am trying to remove a massive amount of cruft from a .NET 3.5, VS2008 project and I am somewhat confused as to what gets compiled into an EXE and what isn't.
So for instance, if I double click on my Resources.Resx file, i get the following:
As you can see it states that this bitmap is "Linked at compile time". However, when I go t...
I have very little data for my analysis, and so I want to produce more data for analysis through interpolation.
My dataset contain 23 independent attributes and 1 dependent attribute.....how can this done interpolation?
...
I have one asp.net simple page, on button click I'm trying to start one process(.net console application) but I'm having access denied exception..
If the process is simple windows applications like notepad.exe, or anything else "not .net assembly" the code works...
The problem only happens when I'm running the code from IIS, but from Vi...