Is this the right method to reverse a string? I'm planning to use it to reverse a string like: Products X1 X3 to X3 X1 Products
I want it to be a global function which can be used elsewhere.
public static string ReverseString(string input, string separator, string outSeparator)
{
string result = String.Empty;
string[] temp =...
I have a simpleAsp.net page which I make it Ajaxable. everything works fine but I face with a problem whenever a specific method calls.
Actually the Browser tell me that
Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.WebControl'.
...
Hey,
I have an android devic, i wish to know when it is connected to the pc via java/.net
i know its possible - the Samsung New PC Studio is doing it, when ever i connect an android device it lets me know. how can i achieve the same?
...
How would I write a regular expression (C#) which will check a given string to see if any of its characters are characters OTHER than the following:
a-z
A-Z
Æ æ Å å Ø ø - '
...
I want to add search functionality to my program. There's a class which has this function:
public DataTable Search()
{
string SQL = "Select * from Customer where " + mField + " like '%" + mValue + "%'";
DataTable dt = new DataTable();
dt = dm.GetData(SQL);
return (dt);
}...
I'm trying to create an add-in for SSMS 2008 and/or 2008 R2 but I've run into a problem straight away.
I can get my add-in to work and on SSMS start-up get it to simply show a message box.
However, after downloading various code-samples, when trying to reference Microsoft.SqlServer.Management.UI.VSIntegration.ServiceCache I get a null ...
Hi,
We have a lot of WCF services using as a host windows services. And as we are upgrading our servers to windows server 2008 R2 we are planning to migrate some of services under WAS.
Also having already the release of AppFabric it is interesting does AppFabric is mature to be used, so may be we can use it instead of WAS. Is there alre...
I'm starting to read in-depth on the .NET framework, and its Common Language Runtime. I'm reading a .NET overview by Microsoft and I'm not sure what is meant by this statement.
Code that targets the runtime is known
as managed code, while code that does
not target the runtime is known as
unmanaged code.
How do you target the...
Hi experts,
I am developing an desktop based application using VB.NET, similar to add/remove program. everything was working fine until i start working on uninstall feature.
Now what am i doing is that i get the uninstall string of the specific application from the registry and use System.Diagnostics.Process to run UninstallString.
Di...
Suppose there is an element in XML data: <abc:xyz:name attr="value"/>
I'm trying to read it with XmlReader. The problem is that I get XmlException that says
The ‘:’ character, hexadecimal value 0x3A, cannot be included in a name
I have already declared "abc" namespace. I have also tried adding "abc:xyz" and "xyz" namespaces. But t...
I am trying to Insert a record in MS Access DB using OLEDB in windows application.
I am getting an error "missing semicolon at end of sql statement" there is no syntax error in sql insert statment.
My code
Insert statement = INSERT INTO Student
VALUES ('SRI-10-101','001','guru','30/05/2010 12:00:00 AM','','','...
Hello everyone,
I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to develop a simple video application using the open source slvideoplayer of Silverlight.
http://slvideoplayer.codeplex.com/
For the player, the play control is at the bottom of the rendering video, any ideas how to place play control at the top of video? I have tr...
Hi. I've got a DataGridView control which is bound to a database table. I want one of the columns in the gridview to be of combobox type. The combobox should contain a list of hardcoded strings, which is the same for all rows in the datagridview. One of the fields in my database table is an index for this list of hardcoded strings.
...
i can not see MyLoad.TreeLoader(.... but why i can not see?
i implemented iloader to TreeViewLoad. i should see TreeLoader why?
namespace Rekursive
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
...
Hi there!
Objective: Serialize all the public properties of the ClassMain:
public class ClassMain
{
ClassA classA = new ClassA();
public ClassMain()
{
classA.Prop1 = "Prop1";
classA.Prop2 = "Prop2";
}
public string Prop1 { get; set; }
public string Prop2 { get; set; }
public ClassA ClassA
...
I have created a c# 2.0 WinForm application which loads dlls, searches for an interface, and then loads the interface as a plugin. I am loading the plugins in the same appdomain as the main application because they have a GUI which I am directly loading into the application as a tab item.
I would like to load them in their own app domai...
i wrote some code blocks about ref -out declaration. i think that ref is most useful out. Ok. why i need to use out. i can use always ref everytime:
namespace out_ref
{
class Program
{
static void Main(string[] args)
{
sinifA sinif = new sinifA();
int test = 100;
sinif.MethodA(...
I'm trying to find out max available area on my printer. I've printed a simple rectangle trying out different boundary variables. My question is, why doesn't first two work correctly? They don't print a full rectangle on the paper, only the left and top sides are drawn. Why does only the third one prints a full rectangle? I was under the...
Hello,
I am using a code sample to connect to a webcam, and don't really understand the meaning of the variables passed to the SendMessage method.
SendMessage(DeviceHandle, WM_CAP_SET_SCALE, -1, 0)
SendMessage(DeviceHandle, WM_CAP_SET_PREVIEW, -1, 0)
What does the -1 mean? To scale/preview or not to scale/preview? I'd prefer that zer...
I have a few questions on good programming design. I'm going to first describe the project I'm building so you are better equipped to help me out.
I am coding a Remote Assistance Tool similar to TeamViewer, Microsoft Remote Desktop, CrossLoop. It will incorporate concepts like UDP networking (using Lidgren networking library), NAT trave...