|
Is there not a trial that you could use before buying?
[edit] from googling their site I can see that there is a 30 day trial that you could use[/edit]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thanks for the answer. Yes I have it and it does fit my needs. I was just checking if anyone had used it. I know it's popular but was just wondering if you guys used it and what your thoughts were.
Relativity
|
|
|
|
|
suppose I have the following code
class Program
{
static void Main(string[] args)
{
if( args.Lenght==0){
System.Console.WriteLine("Hello, World!");
}
else
{System.Console.WriteLine("Bye Bye, World!");}
}
}
Using reflection I need to call "Hello, Word!", I try this:
System.Reflection.Assembly newAssembly = System.Reflection.Assembly.LoadFrom(@"C:\AppDomains.exe");
newAssembly.EntryPoint.Invoke(null, new string[] { null });
But Bye Bye appears...I should look for a solution without changing my Program class of course.
Any idea?
Thanks
|
|
|
|
|
Mm.. let see...
What is the size of this array?
TheGermoz wrote: new string[] { null }
1 I shall say!!
You can try new string[] {} or new string[0] instead...
My programming get away... The Blog...
Taking over the world since 1371!
|
|
|
|
|
It returns "parameter count mismatch", isn't it?
|
|
|
|
|
of course it will say "bye bye". Aren't you passing in a array of length 1, null being the first member of the string array?
Relativity
|
|
|
|
|
yes do you know how to show Hello Word without changing the program class?
|
|
|
|
|
|
I works for all class, It is the matter to let know I'm using a method where parameter is needed, but it should be zero length.
The question is do you know how to do it without workaround?
The answer do not use it, it sound like I don't know how to do it.
The question is about the use of reflection
modified 21-Jan-13 0:50am.
|
|
|
|
|
I know how to use Reflection. I also know when and when not to use Reflection. The problem you posted earlier can be solved with Reflection, but it is by far not the best solution. I thought that I and the other responders had already given you better ways to do it. If, on the other hand, you just want to experiment with Reflection and see how it can be used to do what you're doing with code that isn't yours, then what you have is fine (once you fix it).
On yet another hand, to run a console application I use my
ProcessCommunicator[^]
|
|
|
|
|
Passing an array in the parameters array can be confusing and you probably would have got it correct if your method had more than one parameter. The important point is that the individual arguments are the values of the parameters array and a value may itself be an array.
Examples:
static Method1(string name, int number)
// 2 args
Method1("District", 9)
Invoke(null, new object[]{ "District", 9 })
static Method2(string[] values)
// 1 array arg with 2 members
Method2(new String[]{"District", "9" })
Invoke(null, new Object[]{new String[]{ "District", "9" } })
// 1 empty array arg
Method2(new String[]{ })
Invoke(null, new Object[]{ new String[]{ } })
Alan.
[EDIT: Corrected minor typo]
modified 21-Jan-13 5:06am.
|
|
|
|
|
i have seen people use this tools Resharper,Ninject,MOQ very much. so i want to know what is Resharper ? what it does and how it help us to develop apps. what is MOQ?
lots of DI component is there then how Ninject got the much hype. what is special about. if possible please discuss who every day use those above component. thnx.
tbhattacharjee
|
|
|
|
|
|
Dears;
i want build a software that can send and receive SMS from windows application C# with USB modem huawei E303.
i found a code but i could't connect to usb port
can you help me please ???
|
|
|
|
|
I don't have that modem, but my questions could propably help you to find out more:
Is the driver installed correctly?
Is there a virtual COM-Port for the modem?
How does the example code connect to the modem? Mabe you can post some snippets.
|
|
|
|
|
I have the same trouble. Even using hyperterminal I cannot connect to it. The only way is 192.168.1.1 but then it is no possible to get the incoming sms to manage them.
Some help will be appreciated.
Kurtz
|
|
|
|
|
A 401 error occur when i use post method to login a website.
The website is: www.19lou.com/login
My username is: cyberarmy
My password is: wangyouliang
My C# code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Web;
namespace _19lou
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
const string LoginUrl = @"http://www.19lou.com/login";
HttpWebRequest httpWebRequest;
HttpWebResponse httpWebResponse;
string responseFromServer;
string username = "cyberarmy";
string password = "wangyouliang";
private void btn_login_Click(object sender, EventArgs e)
{
if (txt_username.Text != "" && txt_password.Text != "")
{
string PostData = string.Format("userName={0}&userPass={1}&captcha=&checked=0&cityInfo=&refererUrl=aHR0cDovL3d3dy4xOWxvdS5jb20=&remember=1", username, password);
SendLogin(LoginUrl, PostData);
}
}
public void SendLogin(string loginUrl, string postData)
{
byte[] byteArray = Encoding.GetEncoding("GBK").GetBytes(postData);
try
{
ServicePointManager.Expect100Continue = false;
CookieContainer cookieContainer = new CookieContainer();
httpWebRequest = (HttpWebRequest)WebRequest.Create(loginUrl);
httpWebRequest.Credentials = new NetworkCredential(username, password, "www.19lou.com");
httpWebRequest.CookieContainer = cookieContainer;
httpWebRequest.Accept = "image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/QVOD, application/QVOD, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-xpsdocument, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
httpWebRequest.Headers["Accept-Language"] = "zh-cn";
httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Method = "POST";
httpWebRequest.ContentLength = byteArray.Length;
Stream dataStream = httpWebRequest.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
if (httpWebResponse.StatusCode == HttpStatusCode.OK)
{
StreamReader reader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.GetEncoding("utf-8"));
responseFromServer = reader.ReadToEnd();
reader.Close();
dataStream.Close();
httpWebResponse.Close();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
|
|
|
|
|
So, you posted your account username and password in a public forum for ANYONE to use? You idiot. I HIGHLY suggest you remove that part or your post, immediately.
|
|
|
|
|
This account is for testing .
|
|
|
|
|
SO FREAKIN' WHAT?? Now ANYONE can impersonate you with malicious intent. Who cares if it's a "test" account.
|
|
|
|
|
Well now we have your username and password, and your email address we can cause any sort of trouble for you.
|
|
|
|
|
I voted to remove the post for the author's own good for that reason.
|
|
|
|
|
You're bypassing a captcha; meaning the site's owner has put in measures to prevent automated bots abusing his/her site. Whatever you're going to do, I doubt it complies with the TOS.
|
|
|
|
|
Just actually went to the URL?? I wasn't going to risk it because of recently exposed exploits.
|
|
|
|
|
hi all
I want to pass generic collection, List<string> with wcf
how to do that ?
i tried [datamember] but it's don't work
|
|
|
|