I've created a class for encrypting and decrypting using AES.
public class AesEncryptionProvider {
#region Fields
// Encryption key
private static readonly byte[] s_key = new byte[32] {
// Omitted...
};
// Initialization vector
private static readonly byte[] s_iv = new byte[16] {
// Omitted...
...
I am using Infragistics WPF NetAdvantage 2010, Volume 2. In what follows, please assume the following definition exists:
xmlns:igRibbon="http://infragistics.com/Ribbon"
My top-level structure is as follows:
<igRibbon:XamRibbonWindow ...>
<igRibbon:RibbonWindowContentHost>
<igRibbon:RibbonWindowContentHost.Ribbon>
<i...
This is more out of personal curiosity/interest than a specific problem I'm trying to solve.
Suppose you have a program that is performing some operation on user-supplied information (such as a search string) that changes as the user types it. Suppose that you want to show the user the most relevant information for what they've typed at...
I need a case-insensitive Replace method for the StringBuilder class. The code should work with the existing StringBuilder. An extension method implementation would be nice.
Following is how I plan to use the method:
[TestMethod]
public void StringBuilder_Replace_TTD() {
StringBuilder oRequestText = new StringBuilder(...
I can't find this info anywhere. Probably because Google is ignoring the keywords. Is there a difference between using <%: and <%= in your asp? They seem interchangeable.
...
Sorry this is quite a vague question. Been trying to find information on using a View with Entity Framework 4. Want to use it as a read only view, no interested in inserting/updating/deleting... Would just like to use a POCO with a view...
[Update]
Thanks to the responders. Zeeshan, actually reading your book currently.
I can add a vi...
I have a couple different custom backup programs and I want to combine them into a single one.
Doing so, I'm working on my OO design to help keep the driving program simple and easy to follow by abstracting my server and database information.
I'm using two different hosts (Discount ASP.net and Rackspace). Both of them go about their bac...
Is it a good practice to create another project in your solution just to configure the container and for registries? I'm wondering where should I put the container configuration, I currently have all the code in my global asax but it's getting messy as I add more registries and more advanced injections.
...
I have multiple .NET assemblies that all need to share common user settings, such as preferences, user names, etc. One is a WPF application, another is a console application, and the third is an Office Add-in. All of these settings are user-scope.
Only the WPF application needs to be able to change settings. The rest just read them.
I...
I have a basic Windows Phone List application, with code like this in the MainViewModel class
// CODE THAT WORKS --
Items.Clear();
foreach (var itm in e.Result)
Items.Add(itm);
Count = Items.Count;
// CODE THAT DOES NOT WORK -- I'm trying to understand WHY
Items = e.Result;
The databinding Xaml looks like this:
<DataTemplate...
I know about MSDN having been a subscriber for a decade.. but.. I am working mostly with open source software nowadays and I am enjoying keeping local copies of documentation bundles for quick offline reference without having to pay for DVDs (e.g. MySQL, Java, Python, even Perl and PHP). Is there anything like this for the .NET? I mean: ...
I want to do something mildly silly. In my Dispose() method for an object, I want to print a debug trace for the object, telling me all events which happened while it was alive.
But as this takes time and money, I only want to do this if Dispose() is being called because an exception was thrown.
So I would like to do
if (exceptionIsC...
I'm trying to do a simple Databinding between a string property of an object instance, and a TextBox control. The string property has both get and set accessors, yet the source object does not implement INotifyProperty changed. This does not matter though as I'm not concerned with the object updating the text, but rather only changes to ...
I'd like to get some source code properly formatted (indents) and color coded to either VS2010 or Eclipse color coding and formatting for display in a browser. I have various languages (.NET, Java, JavaScript, CSS, XML) and can't find any free software that will do this.
I vaguely remember an obsolete API that was used in .Net Framewor...
I am writing a multi-threaded .Net application in which many callers need to concurrently read from a single Socket.
Data read from the socket is split into records / chunks of data - each record is targetted at a specific caller identified by a CallerID in the header, so for example the stream of bytes read from the socket might be som...
I have ToggleButton with an OuterGlowBitmapEffect applied to it. I animate this glow to give it a pulsating effect, drawing peoples attention to it. My problem is, if I slow the animation down for the duration of a second, it stutters a lot. How can I prevent the stutter from occurring and what is it that's causing it to not be smooth?
...
Hi Guys,
Come across a problem with the repository pattern combined with the use of abstract classes.
I have a repository which implements a single method returning an ICollection of an abstract type.
Here's my abstract class:
public abstract class Location
{
public abstract string Name { get; set; }
public abstract LocationTyp...
I have an NHibernate mapping problem that does not seem easy to solve, to me.
Names Table
Id (native, primary key) (int)
entity_type (var char) (designates related table)
entity_id (int) (foreign key (kinda) to various tables, based on entity_type)
first_name
last_name
other columns
People Table
Id (native, primary key) (int)
birt...
How to do multiple Upload/Download in FTP using C# without using FtpWebRequest ?
I have an idea it can be achieved using threads, but i am not able to begin.
If any body has some code snippet for reference for doing multiple Upload/download in FTP using threads, it will be helpful.
...
I'd like to utilize Select & Insert statements on a DataTable in VB.NET or C#.
Example:
Dim Results as DataTable
Results = Select * from SourceDataTable where PlayerID < 10
Is anything similar to this possible?
Thanks
...