|
i am trying to find this System.Assembly. where is it?
thanks
|
|
|
|
|
If you click the link in my previous message you will get the documentation to it. System.Assembly[^]
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
i see... that makes sense. thanks very much
i made a reply before reading this . please ignore.
|
|
|
|
|
Reference is to an assembly (dll). An assembly can contain multiple namespaces. using says that you're using a particular namespace withing an assembly.
« Superman »
|
|
|
|
|
Can anyone help me with this please?
public IEnumerator GetEnumerator()
{
return (IEnumerator)this;
}
It's giving me the an unhandled exeption error that says :Specified Cast is not Valid.
I am implementing this method in a class called PartList.
Please I need urgetn help. I need to submit this program in about an hour.
Thanx in advance,
A Newbie in Tha Block
|
|
|
|
|
I wrote an article for CP in IEnumerator and IEnumerable.Please go through that article, You will get a clear picture that what you need to do.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I’m not entirely sure what your trying to do but if you want to see the contents of an ArrayList for example the code would be something like this. (I’m not compiling this so it may have a syntax error or two but you'll get the idea)
ArrayList ai = new ArrayList();
ai.add(“Hello”);
ai.add(“world”);
IEnumerator _E = ai.GetEnumerator();
while(_E.MoveNext())
{
Console.writline(_E.current.ToString());
}
MSDN link is really good help too http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiotextreaderclassreadblocktopic.asp[^]
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
In WebService, The WebMethod run normally, and return data success.But When WebApplication run the WebMethod, Error has "There is an error in XML document (421, 39)". may it what cause? How to do it?
|
|
|
|
|
your problem is simple : you have an error (bug) on the web server (an uncaught exception maybe)
maybe the application doesn't call the webmethod you think...
try debugging your web application from begin to end and find out where the exception ocurs and how to avoid it
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Given an int variable k that has already been declared , use a while loop to print a single line consisting of 97 asterisks. Use no variables other than k .
or this....
Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has already been declared , use a while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .
Any ideas. I have lots of questions like this. I just need help with one of them so I can work with the rest!
Thanks in advance.
|
|
|
|
|
First, welcome as a new member to CP. This would be better to be asked in the Visual C++[^] forum since you are asking for C code. This forum is for C# questions.
Steve Maier, MCSD MCAD
|
|
|
|
|
Thanks... I am moving it over.
|
|
|
|
|
Logic is same whether it is c or C#. here i am writing example using C#. Try to use correct syntax in c for printing and reciving variable in c while using this logic.
using System;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
int n=5;
for(int i=0;i < n;i++)
{
Console.Write(" *");
} Console.Write("\n");
}
}
}
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Do we have to smack you? Make suggstions and point her in the right direction! Don't write the code for her! How is she going to learn anything if your doing her work for her?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all
I realise this is probably the most basic C# question I could ask, so apologies in advance, but I have searched everywhere and just can't seem to find a complete answer, all in one place.
I have a class called Donor. Inside Donor, I have properties such as Name, Address, Telephone, etc, but I would also like a collection of Donation classes.
The Donation class has properties such as Date, Amount, MethodOfPayment, etc.
So, I have a Donor class and a Donation class. And I would like my Donor class to contain a collection of Donation classes, which can be added to, removed from, and iterated around using foreach.
Could someone show me the basic steps I need to go through in order to achieve this, or point me in the direction of a good example that encompasses this problem.
Many thanks
M
|
|
|
|
|
isittheweekendyet wrote:
Could someone show me the basic steps I need to go through in order to achieve this, or point me in the direction of a good example that encompasses this problem.
You might consider having you Donation class inherit from CollectionBase which is an abstract base class for a strongly typed collection. There is a perfect example on MSDN located here[^]. If you have further questions please feel free to ask.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Here you are trying to create collection of your own type. That is cool. But before starting this, Please go through this article, which discuss clearly about custom collection and iteration. I recommand you to read this for better understanding of custom collection.
Handling Custom Collection
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hi all, I am trying to pass a function name as a parameter and use it to create an OracleDataReader:
<br />
private void DataHandler(string type, string function)<br />
{<br />
AuthViewsLookup myLookup = new AuthViewsLookup(m_AppParam);<br />
<br />
OracleDataReader rdr = myLookup.function;<br />
<br />
while(rdr.Read())<br />
{<br />
}<br />
<br />
rdr.Close();<br />
}<br />
setting the reader to myLookup.function does not work, b/c it wants the actual function name. How can I make this work? Thanks for any help.
|
|
|
|
|
|
That's not exactly what I meant. I want to tell it what function to go to by passing in the function's name.
|
|
|
|
|
I’m a fairly new programmer (was taught C++ over a two year program NAIT) and very new to C# and I was hoping someone can explain to me why string doesn’t have a constructor that accepts a string? To me the following line of code seems intuitively correct but it doesn’t work.
string s = new string(“dog”);
or
string s = new string();
s=”dog”
There must be a reason that the above doesn’t work (other than making me angry.)
The closest I can come to doing the above is
string s = “dog”;
or
string s = “\0”;
And that works but I’d like s to be DMAed.
Admittedly, my understanding of DMA with managed code is week at best. That may be the problem. Any explanations will be helpful.
Thank you,
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
12029 45 Street N.W.
Edmonton, Alberta, Canada T5W 2T7
Res. Ph: (780) 695.5589
Email: rhahn82@telus.net
|
|
|
|
|
I'm not entirely sure why this really matters to you, however if you look through the documentation you will see there are a series of different parameters that the String class can take as a parameter for its constructor. You could do the following (if you wanted that is):
string s = new string("Hello".ToCharArray());
The string class is a reference type, so remember it's important to check for a null value, but otherwise just use the assignment operator, which is how the majority of people tend to use it.
string s = "Hello";
- Nick Parker My Blog | My Articles
|
|
|
|
|
So because it’s a reference type trying to put it on the heap is redundant? Why doesn’t anyone do this:
string s = new string("Hello".ToCharArray());
?
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
HahnTech wrote:
So because it’s a reference type trying to put it on the heap is redundant?
No, your missing the point, I am just not sure I understand why you are hung up on the design of the class? Like I said, what I showed you is simply something you could do, however unlikely.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I am so frustrating to make list in propertygrid by using arraylist. I am well-aware about other articles about this, but I cant get it working. Do I have to use PropertyDescriptorCollection or ICollection? I am not sure bec I dont know which is best to use for building list in propertygrid by arraylist.
I want nodes to look like this:
For example:
-Category
-List 1
Color
Length
....
+List 2
Color
Length
....
+List 3
....
|
|
|
|