|
BobJanova wrote: Your key generator could generate keys in the same form but with hex digits.
I would be interested to know more here? Like I said before, I am still very new to both c# and hex etc, so if you had any code example to show me what you mean I will take a look.
If the code you posted before is what you mean, then the only reason I didnt try it was because I got my c++ copied code to work first.
Really, all I want to be able to do is convert the big string of digits to hex, and be able to convert the hex back to the long string of digits.
The reason I think I need to use bytes is simply because my other functions either take byte arrays as auguments, or return byte arrays.
Thank you again,
Kind Regards,
Stephen
|
|
|
|
|
hi
I'm not professional in oop with c#. I need a sample proffessional project. I want to learn with a project.
If you konw, please send it to me.
if you have a better idea ,please guide me.
regards.
|
|
|
|
|
There are many sample projects on this website. Just look around.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I highly recommend you buy a book for a broad subject such as this. I haven't read it but perhaps this[^]?
There are many online tutorials and videos that will guide you through from start to finish. Maybe try this one from Microsoft[^].
I'm assuming you are a beginner or you wouldn't be asking such a question. If so, you will likely find it very difficult to understand what's going on in a full blown professional project without learning the basic fundemental OOP principles (and other coding methodologies) first.
|
|
|
|
|
Here are some you could try: http://tinyurl.com/3pu3zoe[^].
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
|
hello
i'm having dll built on c#2
when i try to use it on c#4
it doesn't work
so how i convert dll make on c#2 to work on c#4
md_refay
|
|
|
|
|
Pretty much there is zero information in that question.
So what you want to do.
1. Explain exactly what you are doing.
2. Explain exactly what the failure is.
|
|
|
|
|
ok
i have navigator pane that i used to use it on vs 2005
it's dll
when i add it to vs 2010
it generate an error
he type or namespace name 'MT' could not be found (are you missing a using directive or an assembly reference?)
the application didn't see dll reference
when i look at object browser i didn't find dll
i try to remove and add it many times
but the same result
md_refay
|
|
|
|
|
In your project's Solution Explorer, right click on references choose Add Reference and select the Browse tab. Then browse to the dll and click OK.
|
|
|
|
|
Recompile it.
|
|
|
|
|
i recompile it but the same error
md_refay
|
|
|
|
|
He means recompile the DLL source code using VS2010 and the project setting to the version of the runtime you want.
Did you try Daveys suggestion.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm using interop to save Excel files to CSV:
private static void saveAsCSV(string FileName)
{
FileName = FileName.Replace(".xlsx", "");
string destination = csvPath + "\\" + Path.GetFileName(FileName) + ".csv";
if (File.Exists(destination))
{
File.Delete(destination);
}
Application xl = new Application();
try
{
Workbook workbook = xl.Workbooks.Open(FileName);
Worksheet ws = (Worksheet)workbook.Sheets[1];
ws.SaveAs(destination, XlFileFormat.xlCSV);
Marshal.ReleaseComObject(ws);
}
finally
{
xl.DisplayAlerts = false;
xl.Quit();
Marshal.ReleaseComObject(xl);
}
}
After this run the instance of Excel is still open. What's wrong hre?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
I prefer to use ADO.net with the OleDb provider to do that.
But maybe you need to Dispose the xl object?
|
|
|
|
|
You need to release workbook as well.
You may also hit the transient object creation issue with xl.Workbooks ... you may have to do
Application xl = new Application();
var workbooks = xl.Workbooks;
Workbook workbook = workbooks.Open(FileName);
try
{
Worksheet ws = (Worksheet)workbook.Sheets[1];
ws.SaveAs(destination, XlFileFormat.xlCSV);
Marshal.ReleaseComObject(ws);
}
finally
{
xl.DisplayAlerts = false;
xl.Quit();
Marshal.ReleaseComObject(workbook);
Marshal.ReleaseComObject(workbooks);
Marshal.ReleaseComObject(xl);
}
|
|
|
|
|
Hi,
At the below line, its taking lot of time.
Application xl = new Application();
How to reduce that time. Thanks in advance.
|
|
|
|
|
Hi All,
I will be honest with you - I have taken exactly 1 ASP.NET class (instructional class...not object class, haha), so I might be doing this all wrong. I am developing an online employment application for the company that I work for. In my ASP.NET class, they taught us to try and avoid having our .aspx pages speak directly to the database (which I had always done before), so I am trying my best to use that best practice, but this is my first time doing it like this, and there's still some issues I'm trying to work out. I started building this application like I used to build all my other applications...but I think I need help from some more seasoned professionals on how to streamline what I've done in the past to make it fit what I'm trying to do now.
The way I organize my data is like this:
* DatabaseMethods.cs - class I created that connects to the database and has a queryDatabase(String query){} method that I use for sending queries and retrieving results (it returns DataTable objects that I work with when I send SELECT queries.)
* DataMethods.cs - class I created that has DataTable objects inside it for each of the data tables I'm interested in. This class accepts an instance of DatabaseMethods as a parameter in its constructor. Then, I have methods in here for pulling information out of my database and into my DataTable objects when I need them. (i.e. loadNames(){} would load the Names table from the database into the DataTable object Names in my DataMethods object.) My applications are typically fairly small, but I still usually parameterize these load***() methods so that the select queries aren't pulling entire tables in...my DBA would kill me...and since I am the DBA...that would be a form of suicide.
* I place instances of the DatabaseMethods object and the DataMethods object in the code-behind on my Master page. That way, throughout the whole application, on all the various screens, if I need, say, my Names table, I can just go like this: Master.DataMethods.loadNames(); Master.Names.Rows[0]["firstName"]; If I needed the first name field in the first row of that database table, for example.
* What I've now added are objects for my data, and an ObjectMethods.cs class for loading up those objects. All the objects themselves contain are their default constructors, the data fields I'm interested in for them, and methods that load a particular object from the database based on its ID, and methods that save that particular object to the database, whether by updating an existing row or inserting a new one. I sort of correlate objects to database rows. I wasn't sure how else to do that.
So, now that you understand how my application structure is organized (or messed up, depending on how you look at it - and I am welcome to suggestions on how to improve this), here is where my problem with the ObjectDataSource is:
I have a user control called RelativeSupervisorsRecordView.ascx, which has fields for last name, first name, middle name, and relationship. This is where applicants will enter in any supervisors at our company who are related to them, and how. The user can click an add button to get as many or few of these user controls as they want, in case they have anywhere from zero to a zillion relatives that are supervisors at my company.
The Relationship part of this user control is the issue. The relationship is a database table with ids 1 through 8, and values like Parent, Cousin, Child, Granparent, etc.
My user control connects to my Master page and calls the loadRelationshipTypes() method inside of my ObjectMethods class. That method, in turn, calls loadRelationshipTypes() in my DataMethods.cs class, which populates my Relationships data table. Then, the ObjectMethods class takes that data, creates 8 relationship objects out of it, and returns the objects in an IList<relationshiptypes> to my user control. Then, in the Page_Load method, my user control binds that IList to the DropDownList inside itself. When I watch this happen in debug mode, stepping through the code, everything looks good. The data is coming from the database ok, the objects are being created okay, I'm not seeing any exceptions generated on the DataBind command after I set the datasource property of the dropdownlist control, and all looks well. Then, when the page displays, my drop down list has nothing in it. What gives?
If code would make it easier, let me know and I'll post it.
|
|
|
|
|
Say I create a unit test that looks something like this below (autogenerated by VS) to test:
[TestMethod()]
public void UniContexPipeDataTest()
{
IResponse response = null; // TODO: Initialize to an appropriate value
ISeries series = null; // TODO: Initialize to an appropriate value
DateTime asof = new DateTime(); // TODO: Initialize to an appropriate value
UniContext target = new UniContext(response, series, asof);
target.PipeData();
Assert.Inconclusive("TODO: Implement code to verify target");
}
I know I have to initialize response and series but they are big and have lots of other objects and Interfaces embedded within them that need to be instantiated for the UniContext contructor and PipeData() to work correctly.
Q. How do I get the interfaces ready so that the constructor and method PipeData() pass in this unit test?
Right now I can create these objects and interfaces to pass into the target but they will be empty. Both IResponse and ISeries have tons of embedded interfaces and other things like other objects and properties inside them that need to be created and instantiated with data.
Do I need to start with the embedded object first and then do a ordered test unit test type deal?
Do I need to learn about stubs, external dependencies and creating mocks objects?
Any help/advice on this will be appreciated.
--------------------------------------------------------------------------------
|
|
|
|
|
Hi,
I need to make a Lucene exact case insensitive keyword match query.
I tried BooleanQuery to combine TermQuery and WildcardQuery. but it's case sensitive ...
Sample :
Keyword : Business -> Got Results
Keyword : business -> No results
please guide me to achieve this. Thanks in advance.
|
|
|
|
|
Try applying the LowerCaseFilter to your search. Have a look at this[^] article for details.
|
|
|
|
|
This is dealing with a string "The Quick Brown Fox Jumped Over the Lazy Dog.".
But, in my project, I created index files for a bulk data and would like to search for a string using index files. I'm expecting the output ignoring case sensitivity. Please guide me to get this.
Thank you.
|
|
|
|
|
I'd like to serialize this func property of my class.
public Func<object, object, object> CostAdditionFunction { get; set; }
But if I add the [DataMember(Order = 6)] attribute to use DataContract serialisation, I get the following error:
Type 'System.DelegateSerializationHolder+DelegateEntry' with data contract name 'DelegateSerializationHolder.DelegateEntry:http://schemas.datacontract.org/2004/07/System' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.
Not entirely sure I understand the error, or how to resolve it...
The reason for this request is that there is a related class with a object Cost property, and because I don't know the actual type of Cost, I can't just do Cost + Cost as the object might not have a + operator defined. So the func allows me do things like CostAdditionFunction = (s, t) => ((int) s) + ((int) t); .
btw I did try using Generics to solve this as well, but that didn't work when I was trying to provide the GUI layer for these classes. But if I'm doing something utterly stupid, I'll consider alternatives!
|
|
|
|
|
I have converted my C# visual studio 2003 project to visual studio 2010(framework 4.0).
I debugged the code and finally got success to run my application. Every thing in the application seems to be proper functional, but crystal reports. When i opened the crystal report in designer mode it is opening in some sort of format that is unreadable, as i think the crystal reports could not be converted. Is there any way to get all my reports back in designer view, so that i can save my time from being designing again all my reports.
Thanks in Advance
Regards
|
|
|
|
|
Hi all,
I am using datagridview in c# windows application.I having a .dat file,i have to read the extract the data from that file and display in datagridview with checkbox's and the data.
How can i do it.
Thanks in advance.
|
|
|
|
|