Here's the thing. My .NET application crashes with a pretty ugly general exception fault when I try to run it in a machine that doesn't have .NET framework installed.
Is this normal? If it is... is there any way to check for .NET framework to be able to exit gracefully instead?
...
friens,
I Have a grid of 100 or more text boxes (HTML OR ASP.NET) each will be containing a text value of fixed length, need ALL of these passed back to the back end form for mass updating of the database..
i can do this by simple going through each of the controls .text property in code behind
however that makes the code to big and u...
I found this code:
this.Invoke(new EventHandler(EventGetSum));
Is this not the same as writing:
EventGetSum();
What's the use of this?
...
I've recently asked if you can detect from the application if .NET is installed (so that application will not crash with a general exception fault).
The answer seems to be a plain "no". I still want to be able to exit gracefully if .NET is not installed, is there any way to do this?
Keep in mind that I don't want to change the executab...
My team has recently started using Lance Hunt's C# Coding Standards document as a starting point for consolidating our coding standards.
There is one item that we just don't understand the point of, can anyone here shed any light on it?
The item is number 77:
Always validate an enumeration
variable or parameter value before
con...
Hello,
I would like to ask you some help in creating a code the is able to clone a FrameworkElementFactory object created at runtime with the code.
Dim cellTemplateFactory As New FrameworkElementFactory(GetType(NumericTextBox))
cellTemplateFactory.SetValue(NumericTextBox.TypeCodeProperty, Type.GetTypeCode(GetType(Byte)))
Dim b As New ...
I inherited an existing project with a failing build. I can see the exception in the ccnet.log file:
Exception: System.Xml.XmlException: Name cannot begin with the '%' character, hexadecimal value 0x25. Line 17, position 100.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, Strin...
When defining a WCF data contract, which type should one use for collections/lists?
Should it be ICollection<T>,
IList<T>, T[] or...?
Should I use interface types or the concrete types?
What trade offs are there to consider?
...
Just a very general question, that not only applies to this example.
Let's say you have an Online Shop and you want to implement Vouchers/Gift Certificates, but with Constraints. Let's say you have a voucher for 20% off, but that applies only to products added within the last 3 weeks, but not to ones in a special promotion.
I see two w...
Hi
I have something similar to a wizard control, in the middle is a Panel I would like to use to place any child controls.
I have found using the ScrollableControlDesigner will allow dropped controls to be added to the custom/usercontrol, but this is not what I require. It needs to be added to the container, so layout can be applied wi...
Is there any relatively simple way to recognize Regex pattern as simple text or as a rule?
Edit
One example. @"[A-Z0-9]" - is a rule, and @"\[A-Z0-9\]" is a plain simple text (C# string syntax)
...
is there any function of datetime return dayofweekindex? such as:
int Todaywhat_is_Index= = DateTime.Now.IndexOfDayofThisWeek;
if Today is friday, it must be return 5
ifToday is Saturday, it must be return 6
ifToday is Sunday, it must be return 0
...
I have some custom controls that will require custom painting.
I cannot use any of the drawing services available in Windows (e.g. ThemeAPI), since .NET applications ignore look-and-feel of the operating system they are on, and instead use their own look and feel.
e.g.
Toolbars are not the toolbar common control
Status bars are not t...
I want to be able to show in a propertygrid a dropdownlist that show some "string" value but return an "int" value.
For example, let set I got this class :
public class MyObjectOptions : StringConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public ove...
I have a 4-level tree structure, defined by:
<HierarchicalDataTemplate DataType="{x:Type src:Level1}" ItemsSource="{Binding Path=Level2Items}">
<TextBlock Text="{Binding Path=Level1Name}"/>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="{x:Type src:Level2}" ItemsSource="{Binding Path=Level3Items}">
<TextBlock T...
I am using the Membership features in ASP .NET 2.0. I was wondering how I would implement a Forgot your password page when my application is configured to allow only authenticated users. Right now the only page that can be accessed is the login page. I want un-athenticated users to be also allowed to access the forgot your password pa...
I have a question about nHibernate and filtering. I am using nHibernate 2.2 but I think this will apply to versions as early as 1.2.
I have created a simple example to illustrate the problem. I have three domain objects: Country, State, and City (assume the DB tables match the domain and have the appropriate relations defined. I want to...
I have a method where I want to have a parameter that is a Type, but of a certain interface.
E.g.:
public static ConvertFile(Type fileType)
where I can specify fileType inherits IFileConvert.
Is this possible?
...
What is the difference between this:
void MyMethod(IMyInterface value)
{
//...
}
and this:
void MyMethod<T>(T value) where T : IMyInterface
{
//...
}
...
I have a ItemsControl and I will like the items to uniformly fill the the control.
Using a StackPanel as the ItemsPanelTemplate only stretches in one direction.
...