|
I think you are not correct
Manoj
Never Gives up
|
|
|
|
|
Manoj Kumar Rai wrote: I think you are not correct
You could atleast provide an explination rather than going round insulting people.
If you explain why then people will be thankful of learning something new rather than thinking your an arse
|
|
|
|
|
|
Its correct that modifier public is not valid for those function.
Also pls make sure you are accessing those function from a object type of Interface1 or Interface2 and not from a object of the class A directly, to get the access to those function.
i.e.
Interface1 interface1 = new A();
interface1.ReturnString1(); //Here you will be able to access the function.
Manoj
Never Gives up
|
|
|
|
|
All the code is in C#,
so if i dont specify access modifier then by default it is public
after implementing the methods in an interface we can access the methods thru that class's object.why can't we do the same with this.
Amit More(CMC)
-- modified at 3:10 Wednesday 6th June, 2007
|
|
|
|
|
See the function name in the class A is as Interface1.ReturnString1(), and thats why you can not a.ReturnString1(). But the function name for the Interface1 is "ReturnString1" and you can call it using object of type Interface1.
Manoj
Never Gives up
|
|
|
|
|
can u give me a code snippet about how actually u implement it
|
|
|
|
|
I wrote you code in the previous replies it self.
In your case:
A aa = new A();
//Cast it to interface
Interface1 interface1 = aa;
//Now u can call the Function ReturnString1
interface1.ReturnString1();
Also you can write it as:
((Interface1)aa).ReturnString1();
Manoj
Never Gives up
|
|
|
|
|
thank u very much for ur proper consultation.
|
|
|
|
|
I am doing a project and completed some phases...
I am using Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200)and
Microsoft .NET Framework Version 2.0.50727
Microsoft Visual C# 2005 with MS SQL server 2000
I am getting a problem when i try to extract a data from rows or columns to a textbox...
the connectivity works well...
how can i do it...?
plz help.....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
I recommend reading any of the guides commonly available online on how to ask questions.
1 - the information you provide about your version is superfluous, VS2005 would have been fine
2 - your header is meaingless, 'please help' says nothing about your problem
3 - how can we help you without seeing the code you've written ? WE have no idea how you are hoping to bind a textbox to a value, or how you know that connectivity works well, despite your issue.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
I don't know if there's an automated way to do this, or if you need to write your own plumbing code to assign the values and then push them back into the DB as needed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can set the DataGridview enditable. In the Save button handler code get the edited data from the grid and updated into the database.
Manoj
Never Gives up
|
|
|
|
|
something like below:
dataGridView1.SelectedRows[0].Cells[0].Value will give you the valuse of cell#1 from the 1st row selected.
Manoj
Never Gives up
|
|
|
|
|
when i am assigning it to a textbox like
txtcuscode.Text= dataGridView1.SelectedRows[0].Cells[0].Value;
shows an error message like this following..
Cannot implicitly convert type 'object' to 'string'.
plz help me recover this and thanks a lot for the code.....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
cast "dataGridView1.SelectedRows[0].Cells[0].Value" to a string.
Manoj
Never Gives up
|
|
|
|
|
casting done to string...
but error appears...like
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
the error is at this line...
txtcuscode.Text= Convert.ToString(dataGridView1.SelectedRows[0].Cells[0].Value);
the error handler points to the property text of the textbox...
help me overcome this..
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
thanks for ur help
finally i did it....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
i am newbie to the C#, and i don't know which using directive is to use for "SecureFileElement".
i am getting the error as-
"Error The type or namespace name 'SecureFileElement' could not be found (are you missing a using directive or an assembly reference?)"
any help is much appreciated.
Thanks in advance.
by ULZ
-- modified at 2:00 Wednesday 6th June, 2007
cheers
ULZ
|
|
|
|
|
SecureFileElement is not a class in the .NET framework, according to google.
http://www.paulusevan.net/default.aspx[^] is the only reference to this class name I can find online. He's creating a custom config entry.
I recommend getting a handle on C# before you start trying to copy and paste code from the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks for ur quick reply.
Your recommandation is obious but i don't have that much time to get handle on C# for resolve this problem.
I am side by side reading the C# professional book.
U plz suggest any other book to get handle on C#.
tahnks u very much for ur help.
by ULZ
|
|
|
|
|
ulhas555 wrote: Your recommandation is obious but i don't have that much time to get handle on C# for resolve this problem.
To resolve this problem, get the code that defines this class into your project. But, given that this code relates to security issues, I'd worry deeply about having my security code written by someone who is copying code off the web and posting in online forums about how to make it work.
ulhas555 wrote: U plz suggest any other book to get handle on C#.
Inside C# is a good book, if out of date.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have the following doubts in message queue processing
1. Is there any possibility to sort out the message queue according to the priority and other category?
2. Can i add more body to a single message?
3. Is there any provision to read the message without removing it from the queue i.e. peek in file manipulation?
4. Can i use public queue to write the messages and to read the messages from the other system.
Plz help me in order to make my program innovative
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: 1. Is there any possibility to sort out the message queue according to the priority and other category?
No. You can however put in your own logic by peeking into all messages and moving the messages to a custom queue according to its priority.
M. J. Jaya Chitra wrote: 2. Can i add more body to a single message?
No
M. J. Jaya Chitra wrote: 3. Is there any provision to read the message without removing it from the queue i.e. peek in file manipulation?
Yes. The Message class also has a peek method.
M. J. Jaya Chitra wrote: 4. Can i use public queue to write the messages and to read the messages from the other system.
Yes. That's what public queues are for.
SG
|
|
|
|