|
I'm a beginner C# and I was wondering if anyone knows where I could find or buy a chart (flow chart) that helps with the vocabulary of all the different terms. Example: Member Variables are part of Member Definitions. Member Variables can be called 'Fields', 'Characteristics', 'Objects' etc. When I reading they use several, what seems to be, interchangeable terms. It would be nice to look over at a chart that would help clarify these as I'm reading. Not just a vocab list but code with lines or something pointing to different parts and what they're called.
JustBFlat4Now
modified on Tuesday, June 17, 2008 3:06 PM
|
|
|
|
|
The best thing todo would be to buy a good book and study it until you can tell the difference between the items. If you happen to have a few examples of items you are getting confused with, please post them. Otherwise, I am not aware of any flow charts with what you are expecting. If you want I can post some suggestions for C# books, but some reliable publishers are Apress and Sams: Teach Yourself.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
You are correct it just takes time, especially for a beginner. I'm learning that studying C# is like walking up to a brick wall, breaking through, then another brick wall and then breaking through, over and over again. I'm amazed sometimes what seems so hard to understand now makes perfect sense one month later. Regarding the chart of terms for beginners, if someone where to create one, I know it would sell. I know I'd buy one.
Again thanks,
Back to my brick walls!
JustBFlat4Now
|
|
|
|
|
I use crystal report XI with .NET 2005. I have a problem that I would like to pass a parameter at runtime. I use this code which I search from google
SaleByDate rpt = new SaleByDate();
string[] objDate = Utils.Utils.SplitDateTime(currentDate);
string purchaseDate = objDate[2] + "-" + objDate[1] + "-" + objDate[0];
ParameterFields pfs = new ParameterFields();
ParameterField pfPurchaseDate = new ParameterField();
pfPurchaseDate.Name = "INVOICE_DATE";
pfPurchaseDate.HasCurrentValue = true;
ParameterDiscreteValue pdvPurchaseDate = new ParameterDiscreteValue();
pdvPurchaseDate.Value = purchaseDate;
pfPurchaseDate.CurrentValues.Add(pdvPurchaseDate);
pfs.Add(pfPurchaseDate);
crystalReportViewerSaleByDate.ReportSource = rpt;
crystalReportViewerSaleByDate.ParameterFieldInfo = pfs;
crystalReportViewerSaleByDate.Refresh();
but when I run the report. The report still asks me to put a parameter again. Is that normal. If not, how do I disable that prompt parameter.
|
|
|
|
|
I do google and somebody said that it is a bug of Crystal Report XI, but the topic was two years ago, and I already update my program to release 4 or the latest. But I still facing the same problem.
|
|
|
|
|
instead of creating new objects reference the ones in the report file, i.e.
ParameterField pfPurchaseDate = rpt.ParameterFields[0];
pfPurchaseDate.Name = "INVOICE_DATE";
pfPurchaseDate.HasCurrentValue = true;
ParameterDiscreteValue pdvPurchaseDate = new ParameterDiscreteValue();
pdvPurchaseDate.Value = purchaseDate;
pfPurchaseDate.CurrentValues.Add(pdvPurchaseDate);
crystalReportViewerSaleByDate.ReportSource = rpt;
crystalReportViewerSaleByDate.Refresh();
thats what you have to use in CR 2008, they keep removing setable properties in each version. Remember just because they release a new version doesnt mean they actually fixed any one perticular problem. There are quite a few people on the net complaining about things that dont work with CR, that were found a while ago that still havent been resolved.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I am having problems implmenting PCX files in my Image Converter application. I am a rookie programmer and I see that .Net does not support it.. Help would be greatly apprecited.
|
|
|
|
|
A simple search for "C# PCX" revealed Viewing PCX files in C#[^].
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
Thanks but I think that's CPP...
|
|
|
|
|
Yes, that's true, but really you can do the same thing in C#. Look at http://courses.ece.uiuc.edu/ece390/books/labmanual/graphics-pcx.html[^] if you need help with the format. Basically, it comes down to creating a Bitmap object and filling it with data from the PCX.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
SO I put this information into the DLL file?
|
|
|
|
|
Hello,
I am trying to add 'more' Labels in my C# application using a button.
So, when I click the button, a new label needs to be created on my form on pos x,y
I managed to do one. But how do I add more?
I think this is done using a List<>, But I have no idea how that works.
Current source:
private void CreateTextButton(string text)
{
int StartLocationX = 212;
int SpaceBetweenButtons = 5;
int NewPosition;
if (LastPosition != 0)
{
NewPosition = LastPosition + SpaceBetweenButtons;
}
else
{
NewPosition = StartLocationX;
}
this.NPCTextButton = new System.Windows.Forms.Label();
this.NPCTextButton.AutoSize = true;
this.NPCTextButton.BackColor = System.Drawing.Color.Transparent;
this.NPCTextButton.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NPCTextButton.Location = new System.Drawing.Point(NewPosition, 191);
this.NPCTextButton.Name = text;
this.NPCTextButton.Size = new System.Drawing.Size(32, 16);
this.NPCTextButton.TabIndex = 4;
this.NPCTextButton.Text = text;
this.NPCTextButton.Click += new System.EventHandler(this.label1_Click);
this.pictureBox1.Controls.Add(NPCTextButton);
this.NPCTextButton.BackColor = Color.FromArgb(0, NPCTextButton.BackColor);
LastPosition = NewPosition;
}
private void button1_Click(object sender, EventArgs e)
{
CreateTextButton(newNPCTextButtonText.Text);
}
Thanks in advance.
|
|
|
|
|
Hi,
your code looks fine, except maybe for the value of SpaceBetweenButtons; try a larger value,
such as 300 (or calculate it based on the actual width of the previous button).
|
|
|
|
|
OH lol
it does work
I forgot to add the width of the previous button..
stupid me.
Thanks
okay, now that this works.
I need to make the buttons clickable and change the contents of a textbox.
How is this done?
modified on Tuesday, June 17, 2008 1:13 PM
|
|
|
|
|
Hi,
How do I get a list of sql server 2005 machines from the network please?
Thanks
|
|
|
|
|
EnumAvailableSqlServers () will retrieve all SQL 2005 instances.
|
|
|
|
|
Please try this:
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false);
foreach (DataRow drServer in dtSQLServers.Rows)
{
String ServerName;
ServerName = drServer["Server"].ToString();
if (drServer["Instance"] != null &&
drServer["Instance"].ToString().Length > 0)
ServerName += @"\" + drServer["Instance"].ToString();
if (comboBoxServer.Items.IndexOf(ServerName) < 0)
comboBoxServer.Items.Add(ServerName);
}
Find URL for more references:
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.smoapplication.enumavailablesqlservers.aspx[^]
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Hello,
i have a class which needs to write some measurement data to a memory stream. The measurement data can be of multiple (value) types, e.g. float, int, short, etc.
Therefore i wanted my class to be generic.
public void save(T[] data)
{
for (int i = 0; i < data.Length; ++i) ms_.Write(data[0]);
}
whereas ms_ is the aforementioned MemoryStream. This gives me a compiler error and i have no idea how to solve it. Adding where T : struct to the class declaration doesn't help.
Ideas anyone?
Cheers
Jan
|
|
|
|
|
Not to do with your current question, but when you read back the data how do you know if it's an int or a float? Or any other type?
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
The MemoryStream is actually just a buffer which is used to serialize the data to a file. The file has a header so i can derive the data types from there.
Besides, i solved the problem by using Convert.ToByte(data[i]) . Seems to work fine
Cheers
Jan
|
|
|
|
|
It would be nice to see the compiler error, although I suspect it complains about having no overloaded version of write that takes your type.
Try to use a StreamWriter. Like in the following:
public void save(T[] data)
{
StreamWriter sw = new StreamWriter(ms_);
for (int i = 0; i < data.Length; ++i) sw.Write(data[i]);
}
Even better, since there is no guarantee that T is one of the types for which StreamWriter.Write has an overload, you could do this instead:
public void save(T[] data)
{
StreamWriter sw = new StreamWriter(ms_);
for (int i = 0; i < data.Length; ++i) sw.Write(data[i].ToString());
}
|
|
|
|
|
Hi,
How can I access a database from the server when installing my application on the client PC.
thanks
|
|
|
|
|
Can you mention here which Database you are using ?
By the way: You can access via the
(1) Remote Server IP
(2) Valid User Name/Password
(3) Database Name
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
I will use SQL2005 database
|
|
|
|
|
I think Vista might be the culprit....
Anyway, could anyone share with me how to send some data over UDP and recieve it?
Now it's not working, and I have no clue if it's the sending or recieving or both which fails....
Anyway I have simple code like that:
public void Send(byte[] data, IPEndPoint to)<br />
{<br />
using (Socket sock = new Socket(to.AddressFamily, SocketType.Dgram, ProtocolType.Udp))<br />
sock.SendTo(data, SocketFlags.None, to);<br />
}<br />
<br />
<br />
public void Receiving()<br />
{<br />
byte[] rbuf = new byte[1 << 14];<br />
using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))<br />
{<br />
sock.Bind(new IPEndPoint(IPAddress.Any, aPort));<br />
while (true)<br />
{<br />
EndPoint rep = new IPEndPoint(IPAddress.Any, 0);<br />
int read = sock.ReceiveFrom(rbuf, ref rep);<br />
Recieved(rbuf, read, rep);<br />
}<br />
}<br />
}<br />
void Recieved(byte[] buf, int nRead, EndPoint where)<br />
{<br />
Console.WriteLine("Recieved {0} byte(s) from {1}", nRead, where);<br />
}
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
modified on Tuesday, June 17, 2008 10:58 AM
|
|
|
|
|