|
|
how to Consume java written webservices without adding reference in c#
|
|
|
|
|
Prayer, I guess.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello,
I have a project from the university to implement the fax protocol (in any language I want).
The idea is to write a software that will be able to receive a fax from a real fax machine. It can be done in any way I want - any language/environment , via modem or some other idea.
I know how the fax protocol works and I wrote a simple implementation already. The problem is actually running it.
I tried writing a C# program using SerialPort class and to access the modem's received data. The problem is that the modem does its own thing upon connecting and doesn't give me control over the received data.
I ran out of ideas at this point.
What else can I do?
Thank you very much.
|
|
|
|
|
I am selecting a value,group_id,from the database table-group,using a datareader.Then i am assigning the result to the variable str_group.
But why is it giving the message'use of unassigned variable str_group???????My code is like this
string str_group;
OleDbCommand cmd1 = new OleDbCommand("select Group_id from Group_details where group='" + descriptiondpdwnlist.SelectedItem + "'",con1);
dr = cmd1.ExecuteReader();
while (dr.Read ())
{
str_group = (string)dr[0];
}
string cmd2 = "select description from description_details where group_id='"+str_group +"'";
|
|
|
|
|
myinstincts wrote: string str_group;
string str_group = string.Empty;
|
|
|
|
|
Hey ma friends,
I wanted to make my controls(lets say button1)to be circular @ run time ..... like the play button in media player or other players ....... I tried to make it in the button1_Paint() event
but it doesnt work ...... How could I do that ..... Please help me.....
Thank you.
|
|
|
|
|
|
Hi ..
I am stuck with issue & don’t seem to find a way around.
I have an excel sheet which I am reading in my C# windows application . I read values form F column to V column. I collect this in a string array & then display the values of the array to user.
The problem is in differentiating the dates & the number values .. here is the problem I faced:
I have 2 cells ..1st one has value 40524 & the 2nd has 12/12/2010. When I get the values both of them are returned as 40524 !! So how do you determine programmatically which cell actually was meant for numbers & which was for date because if I have to display the contents of a row (without knowing the format) I want to show 12/12/2010 as 12/12/2010 & not as 40524.
I am using the following code to get values from Excel
Range vrange = worksheet.get_Range("F" + i.ToString(), "V" + i.ToString());
System.Array vmyvalues = (System.Array)vrange.Cells.Value2;
string [] ret = ConvertToStringArray(vmyvalues);
As you can see i am getting values from column F to V & when I iterate through the above string array "ret" I can see the value as of 12/12/2010 as 40524 where as I need it as is shown by excel
Thanks for help.
Suunil
|
|
|
|
|
You are getting an implicit conversion to a julian date, you will need to get at the data type of the column rather than just the value.
|
|
|
|
|
& how do I do that? do you have a code snippet ?? I am new to excel programming
|
|
|
|
|
Sorry, I don't work with excel, you need to inspect the properties of the cell you are working with, look for a datatype or possibly format keyword.
|
|
|
|
|
Is there any Way to have some Comments in Right to Left Languages
If there is please tell me
|
|
|
|
|
I want to have a custom configuration . I implement Test class as follow:
public sealed class Test : ConfigurationSection
{
private static ConfigurationPropertyCollection _Properties;
private static readonly ConfigurationProperty _ID =
new ConfigurationProperty("ID", typeof(string),"1");
private static readonly ConfigurationProperty _status =
new ConfigurationProperty("status", typeof(string), "1");
private static readonly ConfigurationProperty _color =
new ConfigurationProperty("color", typeof(string), "1");
public Test()
{
// Property initialization
_Properties =
new ConfigurationPropertyCollection();
_Properties.Add(_ID);
_Properties.Add(_status);
_Properties.Add(_color);
}
protected override ConfigurationPropertyCollection Properties
{
get
{
return _Properties;
}
}
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public string ID
{
get
{
return (string)this["ID"];
}
set
{
this["ID"] = value;
}
}
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public string status
{
get
{
return (string)this["status"];
}
set
{
this["status"] = value;
}
}
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public string color
{
get
{
return (string)this["color"];
}
set
{
this["color"] = value;
}
}
}
To retrieve my custom setting data the using code is as follow. Config can recognize "mySection" but the myConfig is always null. How can I solve this problem.
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(
ConfigurationUserLevel.None) as Configuration;
Test myConfig = new Test();
myConfig = config.GetSection("mySection") as Test;
<configuration>
<configsections>
< mySection >
<add key="ID" value="1">;
<add key="status" value="f">;
<add key="color" value="f">;
tahereh sadeghi
|
|
|
|
|
I'm sure this is a very noobish question and the answer will be obvious once I get it although here it is...
I have created a class that inherits from BindingList<t> and I'm trying to enable the FindCore method. The code is below:
public class AccountList : BindingList<Account>
{
protected override bool SupportsSearchingCore
{
get
{
return true;
}
}
protected override int FindCore(PropertyDescriptor prop, object key)
{
for (int i = 0; i < Count; ++i)
{
if (Items[i].AccountName.ToLower() == ((string)key).ToLower())
return i;
}
return -1;
}
When I create and instance of "AccountList" I don't have access to the FindCore method the IDE says "inaccessable due to it's protection level".
My guess is there is something that I don't understand about the implementation of this method. I've only been working with .NET for about 6 weeks so please excuse my noobish question.
Thanks!
|
|
|
|
|
If you are creating the instance outside AccountList class, you wont be able to access the method since it is protected.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
If thats the case how am I supposed to access the method? I cant access like it was static either.
I'm thinking that I was also supposed to implement an interface and not just override the method, is that the case? The documentation is very vague here.
|
|
|
|
|
Dear,
I start programming a very small project called "CD Collection" for my self learning which is using C Sharp 2005 and MS Access 2007. I would love you to instruct me if possible. I can insert into table (eg: tbl_user (uID, username)) normally but I've no idea how to load these data to combobox (in other form - tbl_cd (cd_id, music_code, uID, cd_set_id)). So, what do I've to code?
1. How to load data from db to combobox?
2. After successfully loaded, I want to know how do I insert uID(from combobox) back to uID in tbl_cd?
Many thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
If you set the datasource of the combobox to be the dataset you get back from the DB, you set the displaymember property to set which column the combobox should show.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Would you mind to give me a code?
Yours,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
From The NorthWind DB:
<br />
DataSet ds = new DataSet();<br />
<br />
ds = empLogic.CustomersAndOrders();<br />
<br />
cmbCustomers.DataSource = ds.Tables["Customes"];<br />
<br />
cmbCustomers.DisplayMember = "CompanyName";<br />
<br />
cmbCustomers.ValueMember = "CustomerID";<br />
<br />
<br />
|
|
|
|
|
I set TransparencyKey of my form and but when I click the transparent area the window behind it gets the click. But I want form get that click even its a invisible part of it... any way to do that ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I have written a C# class which I wish to use in other projects. I have not been able to sift thru the MSDN or code sites to find an example of what I need to add to my code to enable it to be registered and added to a .net project as a reference. This class will be used by other programmers in there project and I do not wish to provide the source, I would rather provide a DLL for them to use.
Can anyone give me some guidance?
|
|
|
|
|
just set in project properties "Application type : DLL", just compile it, and you can use it from another application as a reference. It is so easy.
|
|
|
|
|
stancrm,
I am using C# VS 2005 and it does not have the DLL option for Application (Output) Type, only 'Windows Application', Console Application', and 'Class Library' - which is what I have selected believeing that a DLL is a Class Library. After compiling for release, I get a "Failed to find 'DLLRegisterServer' function" in DLL error message when I try to register with 'Regsvr32'.
I do Thank You for your assistance!!!
Densher
Densher
|
|
|
|